From 91ecc8efa9b9fd0811b2c194b76a8e3200dcf8c4 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Tue, 10 May 1994 19:01:48 +0000 Subject: [PATCH] Trivial change to prepare for a real one --- gdb/ChangeLog | 4 ++++ gdb/inflow.c | 21 +++++++++++++++++---- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 9beaed8..5bf998a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +Tue May 10 11:57:53 1994 Stan Shebs (shebs@andros.cygnus.com) + + * inflow.c (job_control): Move definition to front of file. + Tue May 10 14:42:37 1994 Ian Lance Taylor (ian@tweedledumb.cygnus.com) * maint.c (print_section_table): Rename SEC_SHARED_LIBRARY to diff --git a/gdb/inflow.c b/gdb/inflow.c index f3757d5..fc0bc35 100644 --- a/gdb/inflow.c +++ b/gdb/inflow.c @@ -58,6 +58,10 @@ kill_command PARAMS ((char *, int)); static void terminal_ours_1 PARAMS ((int)); +/* Nonzero if we have job control. */ + +int job_control; + /* Nonzero if we are debugging an attached outside process rather than an inferior. */ @@ -176,7 +180,13 @@ terminal_init_inferior () free (inferior_ttystate); inferior_ttystate = SERIAL_GET_TTY_STATE (stdin_serial); #ifdef PROCESS_GROUP_TYPE -#ifdef PIDGET /* XXX Lynx */ +#ifdef PIDGET + /* This is for Lynx, and should be cleaned up by having Lynx be + a separate debugging target with a version of + target_terminal_init_inferior which passes in the process + group to a generic routine which does all the work (and the + non-threaded child_terminal_init_inferior can just pass in + inferior_pid to the same routine). */ inferior_process_group = PIDGET (inferior_pid); #else inferior_process_group = inferior_pid; @@ -318,7 +328,10 @@ terminal_ours_1 (output_only) /* Here we used to set ICANON in our ttystate, but I believe this was an artifact from before when we used readline. Readline sets - the tty state when it needs to. */ + the tty state when it needs to. + FIXME-maybe: However, query() expects non-raw mode and doesn't + use readline. Maybe query should use readline (on the other hand, + this only matters for HAVE_SGTTY, not termio or termios, I think). */ /* Set tty state to our_ttystate. We don't change in our out of raw mode, to avoid flushing input. We need to do the same thing @@ -326,6 +339,7 @@ terminal_ours_1 (output_only) terminal_is_ours and terminal_is_ours_for_output flags. It's OK, though, since readline will deal with raw mode when/if it needs to. */ + SERIAL_NOFLUSH_SET_TTY_STATE (stdin_serial, our_ttystate, inferior_ttystate); @@ -598,8 +612,6 @@ clear_sigint_trap() } -int job_control; - /* This is here because this is where we figure out whether we (probably) have job control. Just using job_control only does part of it because setpgid or setpgrp might not exist on a system without job control. @@ -613,6 +625,7 @@ int gdb_setpgid () { int retval = 0; + if (job_control) { #if defined (NEED_POSIX_SETPGID) || defined (HAVE_TERMIOS) -- 2.7.4