public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Takashi Yano <tyan0@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole(). Date: Mon, 18 Apr 2022 12:03:37 +0000 (GMT) [thread overview] Message-ID: <20220418120337.E246A3858C50@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=98b6f23d98c5c75f96abd91860a2dccbebe7ffda commit 98b6f23d98c5c75f96abd91860a2dccbebe7ffda Author: Takashi Yano <takashi.yano@nifty.ne.jp> Date: Mon Apr 18 19:56:14 2022 +0900 Cygwin: pty: Fix deadlock caused by Ctrl-C in setup_pseudoconsole(). - 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 Diff: --- 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;
reply other threads:[~2022-04-18 12:03 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220418120337.E246A3858C50@sourceware.org \ --to=tyan0@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).