aboutsummaryrefslogtreecommitdiff
path: root/lib/libc_r/uthread/uthread_sig.c
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2000-11-20 13:12:44 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2000-11-20 13:12:44 +0000
commit47c157178573308e313f5135d0ae22dc4e390fd9 (patch)
treeddd098f74c44b8bf2a32b4f766bbbd6753a544e3 /lib/libc_r/uthread/uthread_sig.c
parent1b2da3b0e4e83d62a342c57d97f61beedd837931 (diff)
downloadsrc-47c157178573308e313f5135d0ae22dc4e390fd9.tar.gz
src-47c157178573308e313f5135d0ae22dc4e390fd9.zip
Change a "while {}" loop to a "do {} while" to allow it to be
executed at least once, fixing pthread_mutex_lock() for recursive mutex lock attempts. Correctly set a threads signal mask while it is executing a signal handler. The mask should be the union of its current mask, the signal being handled, and the mask from the signal action. Reported by: Dan Nelson <dnelson@emsphone.com> MFC Candidate
Notes
Notes: svn path=/head/; revision=68941
Diffstat (limited to 'lib/libc_r/uthread/uthread_sig.c')
-rw-r--r--lib/libc_r/uthread/uthread_sig.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libc_r/uthread/uthread_sig.c b/lib/libc_r/uthread/uthread_sig.c
index 3ac974036c55..a855a61aeeee 100644
--- a/lib/libc_r/uthread/uthread_sig.c
+++ b/lib/libc_r/uthread/uthread_sig.c
@@ -1057,6 +1057,10 @@ thread_sigframe_add(pthread_t thread, int sig, int has_args)
sizeof(psf->siginfo));
}
+ /* Setup the signal mask: */
+ SIGSETOR(thread->sigmask, _thread_sigact[sig - 1].sa_mask);
+ sigaddset(&thread->sigmask, sig);
+
/* Set up the new frame: */
thread->curframe = psf;
thread->ctxtype = CTX_JB_NOSIG;