2004-09-12 Christopher Faylor <cgf@timesys.com>
+ * sigproc.cc (wait_sig): Ensure that waiting threads are awoken after
+ returning from a hold condition.
+
+2004-09-12 Christopher Faylor <cgf@timesys.com>
+
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
2004-09-11 Pierre Humblet <pierre.humblet@ieee.org>
}
sigpacket *q;
+ bool clearwait = false;
switch (pack.si.si_signo)
{
case __SIGCOMMUNE:
if (myself->getsigmask () & (bit = SIGTOMASK (q->si.si_signo)))
*pack.mask |= bit;
break;
- case __SIGFLUSH:
- case __SIGFLUSHFAST:
- sigq.reset ();
- while ((q = sigq.next ()))
- if (q->si.si_signo == __SIGDELETE || q->process () > 0)
- sigq.del ();
- break;
case __SIGHOLD:
holding_signals = 1;
break;
case __SIGNOHOLD:
holding_signals = 0;
+ /* fall through, intentionally */
+ case __SIGFLUSH:
+ case __SIGFLUSHFAST:
+ sigq.reset ();
+ while ((q = sigq.next ()))
+ {
+ int sig = q->si.si_signo;
+ if (sig == __SIGDELETE || q->process () > 0)
+ sigq.del ();
+ if (sig == __SIGNOHOLD && q->si.si_signo == SIGCHLD)
+ clearwait = true;
+ }
break;
default:
if (pack.si.si_signo < 0)
}
}
if (sig == SIGCHLD)
- proc_subproc (PROC_CLEARWAIT, 0);
+ clearwait = true;
}
break;
}
+ if (clearwait)
+ proc_subproc (PROC_CLEARWAIT, 0);
if (pack.wakeup)
{
SetEvent (pack.wakeup);