diff options
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r-- | gdb/fork-child.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/gdb/fork-child.c b/gdb/fork-child.c index 613f1ee..b413889 100644 --- a/gdb/fork-child.c +++ b/gdb/fork-child.c @@ -24,7 +24,8 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "target.h" #include "wait.h" #include "gdbcore.h" -#include "terminal.h" /* For #ifdef TIOCGPGRP and new_tty */ +#include "serial.h" /* For job_control. */ +#include "terminal.h" /* For new_tty */ #include <signal.h> @@ -152,20 +153,10 @@ fork_inferior (exec_file, allargs, env, traceme_fun, init_trace_fun) if (debug_fork) sleep (debug_fork); -#ifdef TIOCGPGRP /* Run inferior in a separate process group. */ -#ifdef NEED_POSIX_SETPGID - debug_setpgrp = setpgid (0, 0); -#else -#if defined(USG) && !defined(SETPGRP_ARGS) - debug_setpgrp = setpgrp (); -#else - debug_setpgrp = setpgrp (getpid (), getpid ()); -#endif /* USG */ -#endif /* NEED_POSIX_SETPGID */ + debug_setpgrp = gdb_setpgid (); if (debug_setpgrp == -1) perror("setpgrp failed in child"); -#endif /* TIOCGPGRP */ #ifdef SET_STACK_LIMIT_HUGE /* Reset the stack limit back to what it was. */ |