summaryrefslogtreecommitdiff
path: root/lib/libpthread/thread/thr_sig.c
diff options
context:
space:
mode:
authorDavid Xu <davidxu@FreeBSD.org>2003-07-09 22:30:55 +0000
committerDavid Xu <davidxu@FreeBSD.org>2003-07-09 22:30:55 +0000
commit6fbddb9816927046fda645f6ae0639d473b63c73 (patch)
treeb3855590053188ea68b6e4b90ab96eac040dc9ad /lib/libpthread/thread/thr_sig.c
parentb6f5d1d60349935a5749dd35390a41350418b99a (diff)
Notes
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r--lib/libpthread/thread/thr_sig.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index cef83998f962..556c0b0ac06b 100644
--- a/lib/libpthread/thread/thr_sig.c
+++ b/lib/libpthread/thread/thr_sig.c
@@ -770,10 +770,12 @@ _thr_sig_add(struct pthread *pthread, int sig, siginfo_t *info)
} else {
/* Increment the pending signal count. */
SIGADDSET(pthread->sigpend, sig);
- pthread->check_pending = 1;
- pthread->interrupted = 1;
- pthread->sigmask = pthread->oldsigmask;
- _thr_setrunnable_unlocked(pthread);
+ if (!SIGISMEMBER(pthread->oldsigmask, sig)) {
+ pthread->check_pending = 1;
+ pthread->interrupted = 1;
+ pthread->sigmask = pthread->oldsigmask;
+ _thr_setrunnable_unlocked(pthread);
+ }
}
return;
@@ -836,10 +838,12 @@ thr_sig_check_state(struct pthread *pthread, int sig)
} else {
/* Increment the pending signal count. */
SIGADDSET(pthread->sigpend, sig);
- pthread->check_pending = 1;
- pthread->interrupted = 1;
- pthread->sigmask = pthread->oldsigmask;
- _thr_setrunnable_unlocked(pthread);
+ if (!SIGISMEMBER(pthread->oldsigmask, sig)) {
+ pthread->check_pending = 1;
+ pthread->interrupted = 1;
+ pthread->sigmask = pthread->oldsigmask;
+ _thr_setrunnable_unlocked(pthread);
+ }
}
break;