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:
authorChristopher Faylor <me@cgf.cx>2003-08-22 05:07:01 +0400
committerChristopher Faylor <me@cgf.cx>2003-08-22 05:07:01 +0400
commita9f7754462b24b80c88c9c8fb634c28838e46753 (patch)
tree7d3e7085304eca83e38d0f9ec95fae07b856105f /winsup/cygwin
parent346c0bf9fc80a920c376063ef0c255847e630d06 (diff)
* sigproc.cc (wait_sig): Avoid infinite loop.
Diffstat (limited to 'winsup/cygwin')
-rw-r--r--winsup/cygwin/ChangeLog4
-rw-r--r--winsup/cygwin/sigproc.cc6
2 files changed, 7 insertions, 3 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index e1226cf75..e3a3d9791 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,7 @@
+2003-08-21 Christopher Faylor <cgf@redhat.com>
+
+ * sigproc.cc (wait_sig): Avoid infinite loop.
+
2003-08-20 Christopher Faylor <cgf@redhat.com>
* speclib: Reenable removal of temp files.
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index fe1441dcf..02af13a5c 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1166,10 +1166,10 @@ wait_sig (VOID *self)
* array looking for any unprocessed signals.
*/
pending_signals = false;
- bool saw_failed_interrupt = false;
bool more_signals = false;
+ bool saw_failed_interrupt = false;
do
- for (int sig = -__SIGOFFSET; sig < NSIG; sig++)
+ for (int sig = -__SIGOFFSET, more_signals = false; sig < NSIG; sig++)
{
LONG x = InterlockedDecrement (todo + sig);
if (x < 0)
@@ -1232,7 +1232,7 @@ wait_sig (VOID *self)
goto out;
}
}
- while (more_signals);
+ while (more_signals && !saw_failed_interrupt);
out:
/* Signal completion of signal handling depending on which semaphore