summaryrefslogtreecommitdiffstats
path: root/lib/libpthread
diff options
context:
space:
mode:
authordeischen <deischen@FreeBSD.org>2003-05-30 00:09:22 +0000
committerdeischen <deischen@FreeBSD.org>2003-05-30 00:09:22 +0000
commit51dd2dd2b3fe2cc5a81d2a41ffc4166698a4b22f (patch)
tree1493ec223b654c43a7dbf8a2d46dac73c56fff26 /lib/libpthread
parent52d5c0b256b0a78a802032002daf4ca6dac3216f (diff)
downloadFreeBSD-src-51dd2dd2b3fe2cc5a81d2a41ffc4166698a4b22f.zip
FreeBSD-src-51dd2dd2b3fe2cc5a81d2a41ffc4166698a4b22f.tar.gz
Call the __sys_sigprocmask(the system call) when sigprocmask()
is called and the application is not threaded. This works around a problem when an application that hasn't yet become threaded tries to jump out of a signal handler. Reported by: mbr Approved by: re@ (rwatson)
Diffstat (limited to 'lib/libpthread')
-rw-r--r--lib/libpthread/thread/thr_sigprocmask.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sigprocmask.c b/lib/libpthread/thread/thr_sigprocmask.c
index a56e63e..ec39da0 100644
--- a/lib/libpthread/thread/thr_sigprocmask.c
+++ b/lib/libpthread/thread/thr_sigprocmask.c
@@ -44,5 +44,8 @@ __weak_reference(_sigprocmask, sigprocmask);
int
_sigprocmask(int how, const sigset_t *set, sigset_t *oset)
{
- return (pthread_sigmask(how, set, oset));
+ if (_kse_isthreaded() != 0)
+ return (pthread_sigmask(how, set, oset));
+ else
+ return (__sys_sigprocmask(how, set, oset));
}
OpenPOWER on IntegriCloud