diff options
author | Christopher Faylor <me@cgf.cx> | 2004-03-26 16:15:23 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2004-03-26 16:15:23 +0000 |
commit | 85427a949aefae40a57ee940ad90488f6e0965c5 (patch) | |
tree | 682d6792aba5b151b749d47dda2cb2a9852d6c4a | |
parent | ff9f5c83307da538c7e00fcbd06a2ae5ce75bf79 (diff) | |
download | cygnal-85427a949aefae40a57ee940ad90488f6e0965c5.tar.gz cygnal-85427a949aefae40a57ee940ad90488f6e0965c5.tar.bz2 cygnal-85427a949aefae40a57ee940ad90488f6e0965c5.zip |
* sigproc.cc (wait_sig): Make sure that SIGCHLD is handled regardless of
whether a signal is queued.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/sigproc.cc | 17 |
2 files changed, 15 insertions, 7 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 07c9a1b8d..7dcefe0b9 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -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. diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index 4dc9bdb9e..055029979 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -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); |