diff --git a/winsup/cygwin/fhandler_tty.cc b/winsup/cygwin/fhandler_tty.cc index 14165bdfc..ce82c5793 100644 --- a/winsup/cygwin/fhandler_tty.cc +++ b/winsup/cygwin/fhandler_tty.cc @@ -667,7 +667,7 @@ fhandler_pty_slave::push_to_pcon_screenbuffer (const char *ptr, size_t len) /* If not attached pseudo console yet, try to attach temporally. */ if (!pcon_attached) { - if (has_master_opened ()) + if (has_master_opened () && get_ttyp ()->attach_pcon_in_fork) return; pidRestore = @@ -1246,7 +1246,7 @@ fhandler_pty_slave::ioctl (unsigned int cmd, void *arg) DWORD pidRestore = 0; if (!pcon_attached) { - if (has_master_opened ()) + if (has_master_opened () && get_ttyp ()->attach_pcon_in_fork) goto resize_cyg; pidRestore = fhandler_console::get_console_process_id