Don't panic when sigsuspend is interrupted by a cancellation.
PR: 75273
This commit is contained in:
parent
9eec299fab
commit
de2faa4a12
@ -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 {
|
||||
|
@ -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 {
|
||||
|
Loading…
x
Reference in New Issue
Block a user