Cygwin: pty: Fix state mismatch caused in octave gui.
- In octave gui, sometimes state mismatch between real pty state and state variable occurs. For example, this occurs when 'ls' command is executed in octave gui. This patch fixes the issue.
This commit is contained in:
parent
0ac792dfad
commit
680720e58a
|
@ -947,6 +947,15 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
||||||
{
|
{
|
||||||
FreeConsole ();
|
FreeConsole ();
|
||||||
AttachConsole (pid_restore);
|
AttachConsole (pid_restore);
|
||||||
|
cygheap_fdenum cfd (false);
|
||||||
|
int fd;
|
||||||
|
while ((fd = cfd.next ()) >= 0)
|
||||||
|
if (cfd->get_major () == DEV_PTYS_MAJOR)
|
||||||
|
{
|
||||||
|
fhandler_pty_slave *ptys =
|
||||||
|
(fhandler_pty_slave *) (fhandler_base *) cfd;
|
||||||
|
ptys->fixup_after_attach (false, fd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return (int) res;
|
return (int) res;
|
||||||
|
|
Loading…
Reference in New Issue