diff options
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 27c543fa4..e3268ed69 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -408,17 +408,11 @@ build_fh_pc (path_conv& pc) break; case FH_TTY: { - device newdev = pc.dev; - newdev.tty_to_real_device (); - switch (newdev) - { - case FH_CONSOLE: - fh = cnew (fhandler_console) (); - break; - case FH_TTYS: - fh = cnew (fhandler_tty_slave) (); - break; - } + if (myself->ctty == TTY_CONSOLE) + fh = cnew (fhandler_console) (); + else if (myself->ctty >= 0) + fh = cnew (fhandler_tty_slave) (); + break; } } } |