From c5abf768f9d9cacdddcecdc20b366513cbf91b8c Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 30 Aug 2013 15:44:57 +0000 Subject: [PATCH] * sigproc.cc (pending_signals::add): Properly maintain linked list. (wait_sig): Use already calculated 'next' element when signal is blocked. --- winsup/cygwin/ChangeLog | 6 ++++++ winsup/cygwin/sigproc.cc | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 5cd2a5366..976fcde2c 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,9 @@ +2013-08-30 Christopher Faylor + + * sigproc.cc (pending_signals::add): Properly maintain linked list. + (wait_sig): Use already calculated 'next' element when signal is + blocked. + 2013-08-26 Corinna Vinschen * mtinfo.h (class mtinfo_part): Change type of block numbers to int64_t. diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 80a6fff1c..a2a2edd33 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -1190,7 +1190,7 @@ pending_signals::add (sigpacket& pack) if (se->si.si_signo) return; *se = pack; - se->next = NULL; + se->next = start.next; start.next = se; } @@ -1276,7 +1276,7 @@ wait_sig (VOID *) } } break; - default: + default: /* Normal (positive) signal */ if (pack.si.si_signo < 0) sig_clear (-pack.si.si_signo); else @@ -1293,7 +1293,7 @@ wait_sig (VOID *) while ((qnext = q->next)) { if (qnext->si.si_signo && qnext->process () <= 0) - q = q->next; + q = qnext; else { q->next = qnext->next; -- 2.43.5