Cygwin: wait_sig: allow to compute process-wide mask of pending signals
Add a signal __SIGPENDINGALL to allow computing the mask of all currently pending signals. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
05e7a60dd7
commit
195169186b
|
@ -1371,6 +1371,26 @@ wait_sig (VOID *)
|
||||||
case __SIGSTRACE:
|
case __SIGSTRACE:
|
||||||
strace.activate (false);
|
strace.activate (false);
|
||||||
break;
|
break;
|
||||||
|
case __SIGPENDINGALL:
|
||||||
|
{
|
||||||
|
unsigned bit;
|
||||||
|
bool issig_wait;
|
||||||
|
|
||||||
|
*pack.mask = 0;
|
||||||
|
while ((q = q->next))
|
||||||
|
{
|
||||||
|
if (q->sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
|
||||||
|
{
|
||||||
|
tl_entry = cygheap->find_tls (q->si.si_signo, issig_wait);
|
||||||
|
if (tl_entry)
|
||||||
|
{
|
||||||
|
*pack.mask |= bit;
|
||||||
|
cygheap->unlock_tls (tl_entry);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break;
|
||||||
case __SIGPENDING:
|
case __SIGPENDING:
|
||||||
{
|
{
|
||||||
unsigned bit;
|
unsigned bit;
|
||||||
|
|
|
@ -22,7 +22,8 @@ enum
|
||||||
__SIGHOLD = -(_NSIG + 7),
|
__SIGHOLD = -(_NSIG + 7),
|
||||||
__SIGNOHOLD = -(_NSIG + 8),
|
__SIGNOHOLD = -(_NSIG + 8),
|
||||||
__SIGSETPGRP = -(_NSIG + 9),
|
__SIGSETPGRP = -(_NSIG + 9),
|
||||||
__SIGTHREADEXIT = -(_NSIG + 10)
|
__SIGTHREADEXIT = -(_NSIG + 10),
|
||||||
|
__SIGPENDINGALL = -(_NSIG + 11),
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue