* inflow.c: Use 0 (standard input) not scb->fd.
authorJim Kingdon <jkingdon@engr.sgi.com>
Tue, 12 Oct 1993 23:12:17 +0000 (23:12 +0000)
committerJim Kingdon <jkingdon@engr.sgi.com>
Tue, 12 Oct 1993 23:12:17 +0000 (23:12 +0000)
(terminal_ours_1): If printing warning, don't claim it happened in
terminal_inferior.

gdb/ChangeLog
gdb/inflow.c

index b5212e6d4aedf59a79d3988157ada7cc34cae59f..88a4b9bf245f05310a712f9cada2a0d8c99bab68 100644 (file)
@@ -1,5 +1,9 @@
 Tue Oct 12 08:59:15 1993  Jim Kingdon  (kingdon@lioth.cygnus.com)
 
+       * inflow.c: Use 0 (standard input) not scb->fd.
+       (terminal_ours_1): If printing warning, don't claim it happened in
+       terminal_inferior.
+
        * blockframe.c (get_prev_frame_info): Don't error() if there are no
        frames; just return NULL.
 
index 55569d08fe549163d1d43618d3f6dfe8040c78b4..772425fac27b4800b431abdd21f2d4e62ea256b6 100644 (file)
@@ -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
        }