diff options
| -rw-r--r-- | winsup/cygwin/fhandler_tty.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 0ea762b..ec9926e 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -61,6 +61,8 @@ fhandler_tty_master::init () { termios_printf ("Creating master for tty%d", get_unit ()); + slave = dev; + if (init_console ()) { termios_printf ("can't create fhandler"); @@ -1012,13 +1014,14 @@ fhandler_pty_master::open (path_conv *, int flags, mode_t) if (ntty < 0) return 0; - dev.setunit (ntty); + slave = *ttys_dev; + slave.setunit (ntty); cygwin_shared->tty[ntty]->common_init (this); inuse = get_ttyp ()->create_inuse (TTY_MASTER_ALIVE); set_flags ((flags & ~O_TEXT) | O_BINARY); set_open_status (); - termios_printf ("opened pty master tty%d<%p>", get_unit (), this); + termios_printf ("opened pty master tty%d", get_unit ()); return 1; } |
