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:
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 6a7708f0c..981004540 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -402,11 +402,16 @@ sig_clear (int sig)
void
pending_signals::clear (_cygtls *tls)
{
- sigpacket *q, *qnext;
+ sigpacket *q = &start, *qnext;
- for (q = &start; (qnext = q->next); q->next = qnext->next)
+ while ((qnext = q->next))
if (qnext->sigtls == tls)
- qnext->si.si_signo = 0;
+ {
+ qnext->si.si_signo = 0;
+ q->next = qnext->next;
+ }
+ else
+ q = qnext;
}
/* Clear pending signals of specific thread. Called from _cygtls::remove */