OSDN Git Service

* sigproc.cc (wait_sig): Avoid infinite loop.
authorcgf <cgf>
Fri, 22 Aug 2003 01:07:00 +0000 (01:07 +0000)
committercgf <cgf>
Fri, 22 Aug 2003 01:07:00 +0000 (01:07 +0000)
winsup/cygwin/ChangeLog
winsup/cygwin/sigproc.cc

index e1226cf..e3a3d97 100644 (file)
@@ -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.
index fe1441d..02af13a 100644 (file)
@@ -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