[RFA] Fix GDB's handling of the inferior controlling terminal.
Daniel Jacobowitz
drow@false.org
Wed Mar 12 12:40:00 GMT 2008
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
More information about the Gdb-patches
mailing list