aboutsummaryrefslogtreecommitdiff
path: root/gdb/inflow.c
diff options
context:
space:
mode:
authorStu Grossman <grossman@cygnus>1992-01-14 20:31:40 +0000
committerStu Grossman <grossman@cygnus>1992-01-14 20:31:40 +0000
commit7e97eb282603d8732bd7a4a8e63e162a38212c14 (patch)
treec4d91827b68814558a6b6b924a2b0af9321123b3 /gdb/inflow.c
parent0cf9329b647559cc4fb592856d6702adbcf26d00 (diff)
downloadgdb-7e97eb282603d8732bd7a4a8e63e162a38212c14.zip
gdb-7e97eb282603d8732bd7a4a8e63e162a38212c14.tar.gz
gdb-7e97eb282603d8732bd7a4a8e63e162a38212c14.tar.bz2
gdb-pend/620
* inflow.c (child_terminal_info): #ifdef TIOCPGRP around lines that reference pgrp_inferior.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r--gdb/inflow.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 35aad97..332584c 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -78,11 +78,11 @@ static int lmode_ours;
# ifdef SHORT_PGRP
static short pgrp_inferior;
static short pgrp_ours;
-# else
+# else /* not def SHORT_PGRP */
static int pgrp_inferior;
static int pgrp_ours;
-# endif
-#else
+# endif /* not def SHORT_PGRP */
+#else /* not def TIOCGPGRP */
static void (*sigint_ours) ();
static void (*sigquit_ours) ();
#endif /* TIOCGPGRP */
@@ -165,7 +165,12 @@ terminal_inferior ()
#ifdef TIOCGPGRP
result = ioctl (0, TIOCSPGRP, &pgrp_inferior);
- OOPSY ("ioctl TIOCSPGRP");
+ /* If we attached to the process, we might or might not be sharing
+ a terminal. Avoid printing error msg if we are unable to set our
+ terminal's process group to his process group ID. */
+ if (!attach_flag) {
+ OOPSY ("ioctl TIOCSPGRP");
+ }
#else
sigint_ours = (void (*) ()) signal (SIGINT, SIG_IGN);
sigquit_ours = (void (*) ()) signal (SIGQUIT, SIG_IGN);
@@ -298,10 +303,12 @@ child_terminal_info (args, from_tty)
return;
}
+#ifdef TIOCGPGRP
printf_filtered ("Inferior's terminal status (currently saved by GDB):\n");
printf_filtered ("owner pgrp = %d, fcntl flags = 0x%x.\n",
pgrp_inferior, tflags_inferior);
+#endif /* TIOCGPGRP */
#ifdef HAVE_TERMIO