diff options
Diffstat (limited to 'lib/libpthread/thread/thr_sigsuspend.c')
-rw-r--r-- | lib/libpthread/thread/thr_sigsuspend.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libpthread/thread/thr_sigsuspend.c b/lib/libpthread/thread/thr_sigsuspend.c index ede45b5..b8e14e3 100644 --- a/lib/libpthread/thread/thr_sigsuspend.c +++ b/lib/libpthread/thread/thr_sigsuspend.c @@ -74,8 +74,13 @@ _sigsuspend(const sigset_t *set) /* check pending signal I can handle: */ _thr_sig_check_pending(curthread); } - THR_ASSERT(curthread->oldsigmask == NULL, - "oldsigmask is not cleared"); + if ((curthread->cancelflags & THR_CANCELLING) != 0) + curthread->oldsigmask = NULL; + else { + THR_ASSERT(curthread->oldsigmask == NULL, + "oldsigmask is not cleared"); + } + /* Always return an interrupted error: */ errno = EINTR; } else { |