Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-03-01 18:14:39 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-03-01 18:23:24 +0300
commit195169186bfd58e45aaa31236575fb9d5957adad (patch)
treef50db22dce71e5dd9666943b3a4f1db3bba9ecf4 /winsup/cygwin/sigproc.cc
parent05e7a60dd7fac7efd1ac792d45377d6971b55e23 (diff)
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>
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc20
1 files changed, 20 insertions, 0 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index edfdffd7c..449777cda 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -1371,6 +1371,26 @@ wait_sig (VOID *)
case __SIGSTRACE:
strace.activate (false);
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:
{
unsigned bit;