Cygwin: pty: Add a workaround for ^C handling.
- Pseudo console support introduced by commit
169d65a577
sometimes cause random
crash or freeze by pressing ^C while cygwin and non-cygwin
processes are executed simultaneously in the same pty. This
patch is a workaround for this issue.
This commit is contained in:
parent
83b2d576c8
commit
d4045fdbef
|
@ -213,7 +213,6 @@ frok::child (volatile char * volatile here)
|
||||||
- terminate the current fork call even if the child is initialized. */
|
- terminate the current fork call even if the child is initialized. */
|
||||||
sync_with_parent ("performed fork fixups and dynamic dll loading", true);
|
sync_with_parent ("performed fork fixups and dynamic dll loading", true);
|
||||||
|
|
||||||
init_console_handler (myself->ctty > 0);
|
|
||||||
ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
|
ForceCloseHandle1 (fork_info->forker_finished, forker_finished);
|
||||||
|
|
||||||
pthread::atforkchild ();
|
pthread::atforkchild ();
|
||||||
|
|
|
@ -635,6 +635,12 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
|
||||||
if (ptys)
|
if (ptys)
|
||||||
ptys->fixup_after_attach (!iscygwin ());
|
ptys->fixup_after_attach (!iscygwin ());
|
||||||
|
|
||||||
|
if (!iscygwin ())
|
||||||
|
{
|
||||||
|
init_console_handler (myself->ctty > 0);
|
||||||
|
myself->ctty = 0;
|
||||||
|
}
|
||||||
|
|
||||||
loop:
|
loop:
|
||||||
/* When ruid != euid we create the new process under the current original
|
/* When ruid != euid we create the new process under the current original
|
||||||
account and impersonate in child, this way maintaining the different
|
account and impersonate in child, this way maintaining the different
|
||||||
|
|
Loading…
Reference in New Issue