This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Fix GDB's handling of the inferior controlling terminal.
- From: Daniel Jacobowitz <drow at false dot org>
- To: Thiago Jung Bauermann <bauerman at br dot ibm dot com>
- Cc: gdb-patches <gdb-patches at sourceware dot org>
- Date: Wed, 12 Mar 2008 08:39:58 -0400
- Subject: Re: [RFA] Fix GDB's handling of the inferior controlling terminal.
- References: <1205170916.18153.202.camel@localhost.localdomain>
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