OSDN Git Service

* sigproc.cc (wait_sig): Make sure that SIGCHLD is handled regardless of
authorcgf <cgf>
Fri, 26 Mar 2004 16:15:21 +0000 (16:15 +0000)
committercgf <cgf>
Fri, 26 Mar 2004 16:15:21 +0000 (16:15 +0000)
whether a signal is queued.

winsup/cygwin/ChangeLog
winsup/cygwin/sigproc.cc

index 07c9a1b..7dcefe0 100644 (file)
@@ -1,5 +1,10 @@
 2004-03-26  Christopher Faylor  <cgf@redhat.com>
 
+       * sigproc.cc (wait_sig): Make sure that SIGCHLD is handled regardless
+       of whether a signal is queued.
+
+2004-03-26  Christopher Faylor  <cgf@redhat.com>
+
        * sigproc.cc (wait_sig): Report if not trying to send signal due to
        queued signal.
 
index 4dc9bdb..0550299 100644 (file)
@@ -1162,19 +1162,22 @@ wait_sig (VOID *self)
        default:
          if (pack.si.si_signo < 0)
            sig_clear (-pack.si.si_signo);
-         else if (sigq.sigs[pack.si.si_signo].si.si_signo)
-           sigproc_printf ("sig %d already queued", pack.si.si_signo);
          else
            {
              int sig = pack.si.si_signo;
-             int sigres = pack.process ();
-             if (sigres <= 0)
+             if (sigq.sigs[sig].si.si_signo)
+               sigproc_printf ("sig %d already queued", pack.si.si_signo);
+             else
                {
+                 int sigres = pack.process ();
+                 if (sigres <= 0)
+                   {
 #ifdef DEBUGGING2
-                 if (!sigres)
-                   system_printf ("Failed to arm signal %d from pid %d", pack.sig, pack.pid);
+                     if (!sigres)
+                       system_printf ("Failed to arm signal %d from pid %d", pack.sig, pack.pid);
 #endif
-                 sigq.add (pack);      // FIXME: Shouldn't add this in !sh condition
+                     sigq.add (pack);  // FIXME: Shouldn't add this in !sh condition
+                   }
                }
              if (sig == SIGCHLD)
                proc_subproc (PROC_CLEARWAIT, 0);