diff options
author | deischen <deischen@FreeBSD.org> | 2004-12-19 23:23:43 +0000 |
---|---|---|
committer | deischen <deischen@FreeBSD.org> | 2004-12-19 23:23:43 +0000 |
commit | 8fe8e68e769406cc298bf3b1d34bfb0135d1feae (patch) | |
tree | 6e2cf8cb567fd414bb7ac920baf71d1d20f4ff71 /lib/libkse | |
parent | 8c72a601a3bfebd36875647941a8cc673aa6e62d (diff) | |
download | FreeBSD-src-8fe8e68e769406cc298bf3b1d34bfb0135d1feae.zip FreeBSD-src-8fe8e68e769406cc298bf3b1d34bfb0135d1feae.tar.gz |
Don't panic when sigsuspend is interrupted by a cancellation.
PR: 75273
Diffstat (limited to 'lib/libkse')
-rw-r--r-- | lib/libkse/thread/thr_sigsuspend.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_sigsuspend.c b/lib/libkse/thread/thr_sigsuspend.c index ede45b5..b8e14e3 100644 --- a/lib/libkse/thread/thr_sigsuspend.c +++ b/lib/libkse/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 { |