aboutsummaryrefslogtreecommitdiff
path: root/gdb/fork-child.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-06-30 22:20:53 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-06-30 22:20:53 +0000
commitc2e247c4ff760324df53fe50a9ef9168fd5e9452 (patch)
tree294925e76fa072b45c57eb038d0ab0a7f5c022a7 /gdb/fork-child.c
parent0798b091648999794c6d598fd2a4d29f88ab2ef6 (diff)
downloadgdb-c2e247c4ff760324df53fe50a9ef9168fd5e9452.zip
gdb-c2e247c4ff760324df53fe50a9ef9168fd5e9452.tar.gz
gdb-c2e247c4ff760324df53fe50a9ef9168fd5e9452.tar.bz2
* inftarg.c: Remove unused include of terminal.h.
* signals.h: Don't undefine signals anymore. * main.c: Use job_control from serial.h. * fork-child.c (fork_inferior): Use gdb_setpgid. * serial.h, ser-unix.c, ser-go32.c: Provide gdb_setpgid. * utils.c (quit): Use current_target->to_terminal_ours to figure out whether we care about lack of job control, rather than __GO32__. * utils.c: Include serial.h not terminal.h (quit): Use job_control not TIOCGPGRP. * terminal.h: Don't undefine TIOCGPGRP. * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_FLUSH_OUTPUT. * utils.c (quit): Use it. * serial.h: Add SERIAL_UN_FDOPEN. * utils.c (quit): Use it. * ser-unix.c: Add process group to ttystate. [HAVE_SGTTY]: Add tchars, ltchars, and lmode to ttystate. * inflow.c: Include serial.h not terminal.h. Use serial.h stuff to replace most of the maze of #ifdef's. * inflow.c, main.c, inferior.h: make gdb_has_a_terminal a function. * serial.h: Document SERIAL_SET_TTY_STATE as being immediate. * ser-unix.c: Use TIOCSETN not TIOCSETP so it is true. * serial.h, ser-unix.c, ser-go32.c, ser-tcp.c: Add SERIAL_PRINT_TTY_STATE, SERIAL_NOFLUSH_SET_TTY_STATE, and SERIAL_SET_PROCESS_GROUP. * inflow.c: Use them. * config/xm-svr4.h, config/rs6000/xm-rs6000.h, config/sparc/sun4os4.h: Define HAVE_TERMIOS. * Various: Remove all use of TIOC*_BROKEN.
Diffstat (limited to 'gdb/fork-child.c')
-rw-r--r--gdb/fork-child.c15
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. */