* 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.
This commit is contained in:
Christopher Faylor 2011-10-11 12:39:31 +00:00
parent f13f2da4ee
commit 1e5bcae135
2 changed files with 13 additions and 4 deletions

View 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> 2011-10-10 Christopher Faylor <me.cygwin2011@cgf.cx>
* syscalls.cc (open): Add temporary kludge to avoid assigning the * syscalls.cc (open): Add temporary kludge to avoid assigning the

View File

@ -541,10 +541,14 @@ fh_alloc (device dev)
break; break;
case FH_TTY: case FH_TTY:
{ {
if (iscons_dev (myself->ctty)) if (myself->ctty > 0)
fh = cnew (fhandler_console, dev); {
else if (iscons_dev (myself->ctty))
fh = cnew (fhandler_pty_slave, myself->ctty); fh = cnew (fhandler_console, dev);
else
fh = cnew (fhandler_pty_slave, myself->ctty);
fh->dev () = FH_TTY;
}
break; break;
} }
case FH_KMSG: case FH_KMSG: