diff options
author | deischen <deischen@FreeBSD.org> | 2002-06-28 13:28:41 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2002-06-28 13:28:41 +0000 |
commit | aafea422a54211f73e016cb9e1a9acee97fd998a (patch) | |
tree | 62d632e168cc9d7923144927d82bf07c481c79ed /lib/libc_r/uthread/uthread_sigpending.c | |
parent | 1ef8e6c4af8793b1aa6bd0b8eb28b38fc7fd4744 (diff) | |
download | FreeBSD-src-aafea422a54211f73e016cb9e1a9acee97fd998a.zip FreeBSD-src-aafea422a54211f73e016cb9e1a9acee97fd998a.tar.gz |
Make sigpending and sigsuspend account for signals that are pending on
the process as well as pending on the current thread.
Reported by: Andrew MacIntyre <andymac@bullseye.apana.org.au>
Diffstat (limited to 'lib/libc_r/uthread/uthread_sigpending.c')
-rw-r--r-- | lib/libc_r/uthread/uthread_sigpending.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libc_r/uthread/uthread_sigpending.c b/lib/libc_r/uthread/uthread_sigpending.c index 3c7efa4..5eaf6ff 100644 --- a/lib/libc_r/uthread/uthread_sigpending.c +++ b/lib/libc_r/uthread/uthread_sigpending.c @@ -31,6 +31,9 @@ * * $FreeBSD$ */ +#include <sys/param.h> +#include <sys/types.h> +#include <sys/signalvar.h> #include <signal.h> #include <errno.h> #include <pthread.h> @@ -39,9 +42,9 @@ __weak_reference(_sigpending, sigpending); int -_sigpending(sigset_t * set) +_sigpending(sigset_t *set) { - struct pthread *curthread = _get_curthread(); + struct pthread *curthread = _get_curthread(); int ret = 0; /* Check for a null signal set pointer: */ @@ -51,6 +54,7 @@ _sigpending(sigset_t * set) } else { *set = curthread->sigpend; + SIGSETOR(*set, _process_sigpending); } /* Return the completion status: */ return (ret); |