summaryrefslogtreecommitdiffstats
path: root/lib/libpthread/thread/thr_sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libpthread/thread/thr_sig.c')
-rw-r--r--lib/libpthread/thread/thr_sig.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/libpthread/thread/thr_sig.c b/lib/libpthread/thread/thr_sig.c
index 2a8d667..010a999 100644
--- a/lib/libpthread/thread/thr_sig.c
+++ b/lib/libpthread/thread/thr_sig.c
@@ -463,7 +463,11 @@ thr_sig_invoke_handler(struct pthread *curthread, int sig, siginfo_t *info,
ucp->uc_stack = curthread->sigstk;
ucp->uc_stack.ss_flags = (curthread->sigstk.ss_flags & SS_DISABLE)
? SS_DISABLE : ((onstack) ? SS_ONSTACK : 0);
- ucp->uc_sigmask = sigmask;
+ if (curthread->oldsigmask) {
+ ucp->uc_sigmask = *(curthread->oldsigmask);
+ curthread->oldsigmask = NULL;
+ } else
+ ucp->uc_sigmask = sigmask;
shi.sigfunc = sigfunc;
shi.sig = sig;
shi.sa_flags = sa_flags;
OpenPOWER on IntegriCloud