- PTY has a bug reported in:
https://cygwin.com/ml/cygwin/2020-02/msg00067.html.
This is the result of state mismatch between real pseudo console
attaching state and state variable. This patch fixes the issue.
static bool do_not_reset_switch_to_pcon;
static bool freeconsole_on_close = true;
+void
+clear_pcon_attached_to (void)
+{
+ pcon_attached_to = -1;
+}
+
static void
set_switch_to_pcon (void)
{
{
init_console_handler (false);
if (freeconsole_on_close)
- FreeConsole ();
+ {
+ FreeConsole ();
+ pcon_attached_to = -1;
+ }
}
}
}
{
init_console_handler (false);
if (freeconsole_on_close)
- FreeConsole ();
+ {
+ FreeConsole ();
+ pcon_attached_to = -1;
+ }
}
}
}
}
}
+ extern void clear_pcon_attached_to (void); /* fhandler_tty.cc */
+ clear_pcon_attached_to ();
HANDLE& hParent = ch.parent;