* [PATCH] Cygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole().
@ 2022-04-18 11:49 Takashi Yano
0 siblings, 0 replies; only message in thread
From: Takashi Yano @ 2022-04-18 11:49 UTC (permalink / raw)
To: cygwin-patches
- If Ctrl-C is pressed just after setup_pseudoconsole() is called,
mintty stops to respond a while when CPU load is high. This patch
fixes the issue.
Addresses: https://cygwin.com/pipermail/cygwin/2022-April/251272.html
---
winsup/cygwin/spawn.cc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 400457117..c9e1fb6d2 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -679,8 +679,12 @@ child_info_spawn::worker (const char *prog_arg, const char *const *argv,
HANDLE h_stdin = handle (fileno_stdin, false);
if (h_stdin == ptys_primary->get_handle_nat ())
stdin_is_ptys = true;
+ if (reset_sendsig)
+ myself->sendsig = myself->exec_sendsig;
ptys_primary->setup_for_non_cygwin_app (nopcon, envblock,
stdin_is_ptys);
+ if (reset_sendsig)
+ myself->sendsig = NULL;
ptys_primary->get_duplicated_handle_set (&ptys_handle_set);
ptys_ttyp = (tty *) ptys_primary->tc ();
ptys_need_cleanup = true;
--
2.35.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-04-18 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18 11:49 [PATCH] Cygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole() Takashi Yano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).