aboutsummaryrefslogtreecommitdiff
path: root/lib/libkse/thread
diff options
context:
space:
mode:
authorDaniel Eischen <deischen@FreeBSD.org>2004-12-19 23:23:43 +0000
committerDaniel Eischen <deischen@FreeBSD.org>2004-12-19 23:23:43 +0000
commitde2faa4a12486915fbeb6c16867ff3a342e795b8 (patch)
tree6e2cf8cb567fd414bb7ac920baf71d1d20f4ff71 /lib/libkse/thread
parent9eec299fab8ff84590fded62cb6bd7103c08d764 (diff)
downloadsrc-de2faa4a12486915fbeb6c16867ff3a342e795b8.tar.gz
src-de2faa4a12486915fbeb6c16867ff3a342e795b8.zip
Don't panic when sigsuspend is interrupted by a cancellation.
PR: 75273
Notes
Notes: svn path=/head/; revision=139052
Diffstat (limited to 'lib/libkse/thread')
-rw-r--r--lib/libkse/thread/thr_sigsuspend.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libkse/thread/thr_sigsuspend.c b/lib/libkse/thread/thr_sigsuspend.c
index ede45b5d2cca..b8e14e354fea 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 {