diff options
author | Takashi Yano <takashi.yano@nifty.ne.jp> | 2024-11-25 20:55:44 +0900 |
---|---|---|
committer | Takashi Yano <takashi.yano@nifty.ne.jp> | 2024-11-28 20:21:51 +0900 |
commit | 57ce5f1e0bf4a6fef7173b2549edc4f2090dd0e7 (patch) | |
tree | 1bb6ca5f549943fdf0c4fe449a3c7c4e16b36f01 /winsup | |
parent | e10f822a2b39bade20858ba3c704a8bb7d965cb4 (diff) | |
download | newlib-57ce5f1e0bf4a6fef7173b2549edc4f2090dd0e7.zip newlib-57ce5f1e0bf4a6fef7173b2549edc4f2090dd0e7.tar.gz newlib-57ce5f1e0bf4a6fef7173b2549edc4f2090dd0e7.tar.bz2 |
Cygwin: signal: Drop unnecessary queue flush
Previously, the retry flag was always set when pending_signal::pending()
was called. However, if the queue is empty sig thread tries to flush
the queue even though it is not necessary. With this patch, the retry
flag is set only if the queue is not empty.
Addresses: https://cygwin.com/pipermail/cygwin/2024-November/256744.html
Fixes: 5e31c80e4e8d ("(pending_signals::pending): Force an additional loop through wait_sig by setting retry whenever this function is called.")
Reported-by: Christian Franke <Christian.Franke@t-online.de>
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/sigproc.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 8f46a80..4d50a58 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -110,7 +110,7 @@ class pending_signals public: void add (sigpacket&); - bool pending () {retry = true; return !!start.next;} + bool pending () {retry = !!start.next; return retry;} void clear (int sig) {sigs[sig].si.si_signo = 0;} void clear (_cygtls *tls); friend void sig_dispatch_pending (bool); |