mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
* configure.ac (AC_CHECK_FUNCS): Add check for setsid.
* config.in, configure: Regenerate. * fork-child.c (fork_inferior): Call create_tty_session. * inflow.c (new_tty): Set controlling terminal with TIOCSCTTY. (create_tty_session): New function. * terminal.h: Declare create_tty_session.
This commit is contained in:
@@ -303,10 +303,16 @@ fork_inferior (char *exec_file_arg, char *allargs, char **env,
|
||||
if (debug_fork)
|
||||
sleep (debug_fork);
|
||||
|
||||
/* Run inferior in a separate process group. */
|
||||
debug_setpgrp = gdb_setpgid ();
|
||||
if (debug_setpgrp == -1)
|
||||
perror ("setpgrp failed in child");
|
||||
/* Create a new session for the inferior process, if necessary.
|
||||
It will also place the inferior in a separate process group. */
|
||||
if (create_tty_session () <= 0)
|
||||
{
|
||||
/* No session was created, but we still want to run the inferior
|
||||
in a separate process group. */
|
||||
debug_setpgrp = gdb_setpgid ();
|
||||
if (debug_setpgrp == -1)
|
||||
perror ("setpgrp failed in child");
|
||||
}
|
||||
|
||||
/* Ask the tty subsystem to switch to the one we specified
|
||||
earlier (or to share the current terminal, if none was
|
||||
|
||||
Reference in New Issue
Block a user