aboutsummaryrefslogtreecommitdiff
path: root/gdb/inflow.c
diff options
context:
space:
mode:
authorJim Kingdon <jkingdon@engr.sgi.com>1993-10-12 23:12:17 +0000
committerJim Kingdon <jkingdon@engr.sgi.com>1993-10-12 23:12:17 +0000
commitd76eb5f484fd0367a1cfd99365a24c83ba870070 (patch)
tree5c27caeb722481b46300a8bb141970af43b0c6d7 /gdb/inflow.c
parenta71da7601757bb5af48ab2e5cd994735c4295e0d (diff)
downloadgdb-d76eb5f484fd0367a1cfd99365a24c83ba870070.zip
gdb-d76eb5f484fd0367a1cfd99365a24c83ba870070.tar.gz
gdb-d76eb5f484fd0367a1cfd99365a24c83ba870070.tar.bz2
* inflow.c: Use 0 (standard input) not scb->fd.
(terminal_ours_1): If printing warning, don't claim it happened in terminal_inferior.
Diffstat (limited to 'gdb/inflow.c')
-rw-r--r--gdb/inflow.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gdb/inflow.c b/gdb/inflow.c
index 55569d0..772425f 100644
--- a/gdb/inflow.c
+++ b/gdb/inflow.c
@@ -140,7 +140,7 @@ gdb_has_a_terminal ()
our_process_group = tcgetpgrp (0);
#endif
#ifdef HAVE_SGTTY
- ioctl (scb->fd, TIOCGPGRP, &our_process_group);
+ ioctl (0, TIOCGPGRP, &our_process_group);
#endif
}
}
@@ -305,7 +305,7 @@ terminal_ours_1 (output_only)
inferior_process_group = tcgetpgrp (0);
#endif
#ifdef HAVE_SGTTY
- ioctl (scb->fd, TIOCGPGRP, &inferior_process_group);
+ ioctl (0, TIOCGPGRP, &inferior_process_group);
#endif
/* Here we used to set ICANON in our ttystate, but I believe this
@@ -325,12 +325,16 @@ terminal_ours_1 (output_only)
{
#ifdef HAVE_TERMIOS
result = tcsetpgrp (0, our_process_group);
- OOPSY ("tcsetpgrp");
+ if (result == -1)
+ fprintf (stderr, "[tcsetpgrp failed in terminal_ours: %s]\n",
+ strerror (errno));
#endif
#ifdef HAVE_SGTTY
result = ioctl (0, TIOCSPGRP, our_process_group);
- OOPSY ("TIOCSPGRP");
+ if (result == -1)
+ fprintf (stderr, "[TIOCSPGRP failed in terminal_ours: %s]\n",
+ strerror (errno));
#endif
}