diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-03-12 08:57:16 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2025-03-15 00:53:32 +0900 |
commit | 7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e (patch) | |
tree | 8b2e25b440a82ed5c436e88883937db8afeb5423 /winsup | |
parent | c0d7a921bb806ab92f8f05baeaf0e489ee51d3ce (diff) | |
download | newlib-7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e.zip newlib-7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e.tar.gz newlib-7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e.tar.bz2 |
Cygwin: signal: Ignore SIGSTOP while process is already stopping
On Linux, SIGSTOP while the process is stopping is ignored. With
this patch, SIGSTOP is processed as a success with no effect while
the process is already stopping.
Fixes: 8f8eeb70ba73 ("* exceptions.cc (sigpacket::process): ...")
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Diffstat (limited to 'winsup')
-rw-r--r-- | winsup/cygwin/exceptions.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index e2a2054..95904e9 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -1482,7 +1482,10 @@ sigpacket::process () } else if (ISSTATE (myself, PID_STOPPED)) { - rc = -1; /* Don't send signals when stopped */ + if (si.si_signo == SIGSTOP) + rc = 1; /* Ignore (discard) SIGSTOP */ + else + rc = -1; /* Don't send signals when stopped */ goto done; } else if (!sigtls) |