https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e
commit 7f2f33615ffc27b5e6c5a1905bd5917e22a48b9e Author: Takashi Yano <[email protected]> Date: Wed Mar 12 08:57:16 2025 +0900 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 <[email protected]> Signed-off-by: Takashi Yano <[email protected]> Diff: --- winsup/cygwin/exceptions.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index e2a2054cd..95904e950 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)
