From de2faa4a12486915fbeb6c16867ff3a342e795b8 Mon Sep 17 00:00:00 2001 From: Daniel Eischen 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') diff --git a/lib/libpthread/thread/thr_sigsuspend.c b/lib/libpthread/thread/thr_sigsuspend.c index ede45b5d2cca..b8e14e354fea 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.3