From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14646 invoked by alias); 12 Mar 2008 12:40:29 -0000 Received: (qmail 14616 invoked by uid 22791); 12 Mar 2008 12:40:20 -0000 X-Spam-Check-By: sourceware.org Received: from NaN.false.org (HELO nan.false.org) (208.75.86.248) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 12 Mar 2008 12:40:00 +0000 Received: from nan.false.org (localhost [127.0.0.1]) by nan.false.org (Postfix) with ESMTP id 030BA983A1; Wed, 12 Mar 2008 12:39:59 +0000 (GMT) Received: from caradoc.them.org (22.svnf5.xdsl.nauticom.net [209.195.183.55]) by nan.false.org (Postfix) with ESMTP id D806998140; Wed, 12 Mar 2008 12:39:58 +0000 (GMT) Received: from drow by caradoc.them.org with local (Exim 4.69) (envelope-from ) id 1JZQFS-0002U6-2P; Wed, 12 Mar 2008 08:39:58 -0400 Date: Wed, 12 Mar 2008 12:40:00 -0000 From: Daniel Jacobowitz To: Thiago Jung Bauermann Cc: gdb-patches Subject: Re: [RFA] Fix GDB's handling of the inferior controlling terminal. Message-ID: <20080312123958.GA9349@caradoc.them.org> Mail-Followup-To: Thiago Jung Bauermann , gdb-patches References: <1205170916.18153.202.camel@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1205170916.18153.202.camel@localhost.localdomain> User-Agent: Mutt/1.5.17 (2007-12-11) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2008-03/txt/msg00125.txt.bz2 On Mon, Mar 10, 2008 at 02:41:56PM -0300, Thiago Jung Bauermann wrote: > Hi, > > With the current CVS version, if the user specifies a different terminal > for the inferior to run on, GDB doesn't set it as the inferior's > controlling terminal. > > This leads to some problems. For instance, the inferior will not > get SIGINT sent to the terminal. Also, if the inferior is GDB itself, > the following message is shown in the inferior GDB's debugging session: > > [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] > > The attached patch makes GDB set the inferior's controlling terminal, > fixing both of the symptoms above. If the user specifies a different > inferior terminal, GDB will now create a new session right after forking > to run the inferior, and use the TIOCSCTTY ioctl to set the controlling > terminal. > > Ran testsuite, no regressions found. Is this ok? This is OK, thanks. > + ret = setsid(); Space there before paren. -- Daniel Jacobowitz CodeSourcery