[newlib-cygwin/cygwin-3_6-branch] Cygwin: signal: Do not wait for sendsig for non-cygwin process
Takashi Yano
tyan0@sourceware.org
Thu Mar 12 11:32:51 GMT 2026
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=ad853bba44cdf8483064354fa1640f6fb77bd4dc
commit ad853bba44cdf8483064354fa1640f6fb77bd4dc
Author: Takashi Yano <takashi.yano@nifty.ne.jp>
Date: Tue Mar 10 11:07:06 2026 +0900
Cygwin: signal: Do not wait for sendsig for non-cygwin process
Waiting for `sendsig` to be non-zero for non-cygwin process is
pointless, because it never becomes non-zero (see spawn.cc).
Do not wait `sendsig` for a non-cygwin process.
Fixes: d584454c8231 ("* sigproc.cc (sig_send): Wait for dwProcessId to be non-zero as well as sendsig.")
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Corinna Vinschen <corinna@vinschen.de>
(cherry picked from commit 90556ffea1b6c005333066630e548839bed2cbbf)
Diff:
---
winsup/cygwin/sigproc.cc | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 0fd7ed3ba..4ff05967b 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -646,9 +646,12 @@ sig_send (_pinfo *p, siginfo_t& si, _cygtls *tls)
{
HANDLE dupsig;
DWORD dwProcessId;
- DWORD t0 = GetTickCount ();
- while (GetTickCount () - t0 < 100 && !p->sendsig)
- yield ();
+ if (!ISSTATE (p, PID_NOTCYGWIN))
+ {
+ DWORD t0 = GetTickCount ();
+ while (GetTickCount () - t0 < 100 && !p->sendsig)
+ yield ();
+ }
if (p->sendsig)
{
dupsig = p->sendsig;
More information about the Cygwin-cvs
mailing list