From 8fe8e68e769406cc298bf3b1d34bfb0135d1feae Mon Sep 17 00:00:00 2001 From: deischen Date: Sun, 19 Dec 2004 23:23:43 +0000 Subject: Don't panic when sigsuspend is interrupted by a cancellation. PR: 75273 --- lib/libpthread/thread/thr_sigsuspend.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib/libpthread/thread') 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 { -- cgit v1.1