]> sourceware.org Git - newlib-cygwin.git/commitdiff
* dtable.cc (fh_alloc): Don't parse /dev/tty if ctty is < 0. Reset major/minor
authorChristopher Faylor <me@cgf.cx>
Tue, 11 Oct 2011 12:39:31 +0000 (12:39 +0000)
committerChristopher Faylor <me@cgf.cx>
Tue, 11 Oct 2011 12:39:31 +0000 (12:39 +0000)
from the specific tty to those for /dev/tty.

winsup/cygwin/ChangeLog
winsup/cygwin/dtable.cc

index 0d1e1878b40063522cecabb24f1b945706694885..5ae60835683dcc85b47f8c7a3fbf10991347c00f 100644 (file)
@@ -1,3 +1,8 @@
+2011-10-11  Christopher Faylor  <me.cygwin2011@cgf.cx>
+
+       * dtable.cc (fh_alloc): Don't parse /dev/tty if ctty is < 0.  Reset
+       major/minor from the specific tty to those for /dev/tty.
+
 2011-10-10  Christopher Faylor  <me.cygwin2011@cgf.cx>
 
        * syscalls.cc (open): Add temporary kludge to avoid assigning the
index d780136081c6fe28372678163b63bdfc280a29cb..a53596fa12e05f88a19c0b492630bc1e8ec11257 100644 (file)
@@ -541,10 +541,14 @@ fh_alloc (device dev)
          break;
        case FH_TTY:
          {
-           if (iscons_dev (myself->ctty))
-             fh = cnew (fhandler_console, dev);
-           else
-             fh = cnew (fhandler_pty_slave, myself->ctty);
+           if (myself->ctty > 0)
+             {
+               if (iscons_dev (myself->ctty))
+                 fh = cnew (fhandler_console, dev);
+               else
+                 fh = cnew (fhandler_pty_slave, myself->ctty);
+               fh->dev () = FH_TTY;
+             }
            break;
          }
        case FH_KMSG:
This page took 0.042482 seconds and 5 git commands to generate.