* sigproc.cc (wait_sig): Ensure that waiting threads are awoken after returning
from a hold condition.
This commit is contained in:
parent
3d65bb97e8
commit
a5eb75d60c
|
@ -1,3 +1,8 @@
|
||||||
|
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>
|
2004-09-12 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
|
* child_info.h (CURR_CHILD_INFO_MAGIC): Update.
|
||||||
|
|
|
@ -1139,6 +1139,7 @@ wait_sig (VOID *self)
|
||||||
}
|
}
|
||||||
|
|
||||||
sigpacket *q;
|
sigpacket *q;
|
||||||
|
bool clearwait = false;
|
||||||
switch (pack.si.si_signo)
|
switch (pack.si.si_signo)
|
||||||
{
|
{
|
||||||
case __SIGCOMMUNE:
|
case __SIGCOMMUNE:
|
||||||
|
@ -1155,18 +1156,23 @@ wait_sig (VOID *self)
|
||||||
if (myself->getsigmask () & (bit = SIGTOMASK (q->si.si_signo)))
|
if (myself->getsigmask () & (bit = SIGTOMASK (q->si.si_signo)))
|
||||||
*pack.mask |= bit;
|
*pack.mask |= bit;
|
||||||
break;
|
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:
|
case __SIGHOLD:
|
||||||
holding_signals = 1;
|
holding_signals = 1;
|
||||||
break;
|
break;
|
||||||
case __SIGNOHOLD:
|
case __SIGNOHOLD:
|
||||||
holding_signals = 0;
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
if (pack.si.si_signo < 0)
|
if (pack.si.si_signo < 0)
|
||||||
|
@ -1191,10 +1197,12 @@ wait_sig (VOID *self)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sig == SIGCHLD)
|
if (sig == SIGCHLD)
|
||||||
proc_subproc (PROC_CLEARWAIT, 0);
|
clearwait = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (clearwait)
|
||||||
|
proc_subproc (PROC_CLEARWAIT, 0);
|
||||||
if (pack.wakeup)
|
if (pack.wakeup)
|
||||||
{
|
{
|
||||||
SetEvent (pack.wakeup);
|
SetEvent (pack.wakeup);
|
||||||
|
|
Loading…
Reference in New Issue