Cygwin: pty: Add missing guard when PTY is in the legacy mode.
This commit is contained in:
parent
b757a21d85
commit
81c55654e6
|
@ -87,6 +87,7 @@ set_switch_to_pcon (void)
|
||||||
{
|
{
|
||||||
fhandler_base *fh = cfd;
|
fhandler_base *fh = cfd;
|
||||||
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
|
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
|
||||||
|
if (ptys->getPseudoConsole ())
|
||||||
ptys->set_switch_to_pcon (fd);
|
ptys->set_switch_to_pcon (fd);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -105,6 +106,8 @@ force_attach_to_pcon (HANDLE h)
|
||||||
{
|
{
|
||||||
fhandler_base *fh = cfd;
|
fhandler_base *fh = cfd;
|
||||||
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
|
fhandler_pty_slave *ptys = (fhandler_pty_slave *) fh;
|
||||||
|
if (!ptys->getPseudoConsole ())
|
||||||
|
continue;
|
||||||
if (n != 0
|
if (n != 0
|
||||||
|| h == ptys->get_handle ()
|
|| h == ptys->get_handle ()
|
||||||
|| h == ptys->get_output_handle ())
|
|| h == ptys->get_output_handle ())
|
||||||
|
|
Loading…
Reference in New Issue