Don't panic when sigsuspend is interrupted by a cancellation.

PR:	75273
This commit is contained in:
Daniel Eischen 2004-12-19 23:23:43 +00:00
parent 9eec299fab
commit de2faa4a12
2 changed files with 14 additions and 4 deletions

View File

@ -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 {

View File

@ -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 {