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
50e2a63b04
commit
7e6c96d6e1
@ -947,6 +947,15 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
||||
{
|
||||
FreeConsole ();
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user