4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-03-02 13:05:42 +08:00

* sigproc.cc (wait_sig): Make sure that SIGCHLD is handled regardless of

whether a signal is queued.
This commit is contained in:
Christopher Faylor 2004-03-26 16:15:23 +00:00
parent ff9f5c8330
commit 85427a949a
2 changed files with 15 additions and 7 deletions

View File

@ -1,3 +1,8 @@
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> 2004-03-26 Christopher Faylor <cgf@redhat.com>
* sigproc.cc (wait_sig): Report if not trying to send signal due to * sigproc.cc (wait_sig): Report if not trying to send signal due to

View File

@ -1162,11 +1162,13 @@ wait_sig (VOID *self)
default: default:
if (pack.si.si_signo < 0) if (pack.si.si_signo < 0)
sig_clear (-pack.si.si_signo); 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 else
{ {
int sig = pack.si.si_signo; int sig = pack.si.si_signo;
if (sigq.sigs[sig].si.si_signo)
sigproc_printf ("sig %d already queued", pack.si.si_signo);
else
{
int sigres = pack.process (); int sigres = pack.process ();
if (sigres <= 0) if (sigres <= 0)
{ {
@ -1176,6 +1178,7 @@ wait_sig (VOID *self)
#endif #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) if (sig == SIGCHLD)
proc_subproc (PROC_CLEARWAIT, 0); proc_subproc (PROC_CLEARWAIT, 0);
} }