Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Yano <takashi.yano@nifty.ne.jp>2021-11-03 09:14:42 +0300
committerCorinna Vinschen <corinna@vinschen.de>2021-11-03 16:52:03 +0300
commitd4e42ceb96b590f214b16442dc73f0c05db41e09 (patch)
tree9b838813a2af54298ec2b25e24f4cedac494323a /winsup/cygwin/sigproc.cc
parenteb628ca8eac37cc810d6b77c5fa376ce8125b570 (diff)
Cygwin: console: Prevent the exec'ed bash from exiting by Ctrl-C.
- Currently, bash occasionally exits by Ctrl-C with the following scenario. 1) Start bash in the command prompt. 2) Run 'exec bash'. 3) Press Ctrl-C several times. This patch fixes the issue.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 8e70a9329..97211edcf 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -594,6 +594,14 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
p = myself;
}
+ /* If myself is the stub process, send signal to the child process
+ rather than myself. The fact that myself->dwProcessId is not equal
+ to the current process id indicates myself is the stub process. */
+ if (its_me && myself->dwProcessId != GetCurrentProcessId ())
+ {
+ wait_for_completion = false;
+ its_me = false;
+ }
if (its_me)
sendsig = my_sendsig;