* 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

@ -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: