To avoid possible race condition, SIGCANCEL is always sent except the
thread is dead.
This commit is contained in:
parent
4982c539ae
commit
17dce7e108
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=212312
@ -67,7 +67,7 @@ _pthread_cancel(pthread_t pthread)
|
||||
THR_THREAD_LOCK(curthread, pthread);
|
||||
if (!pthread->cancel_pending) {
|
||||
pthread->cancel_pending = 1;
|
||||
if (pthread->cancel_enable)
|
||||
if (pthread->state != PS_DEAD)
|
||||
_thr_send_sig(pthread, SIGCANCEL);
|
||||
}
|
||||
THR_THREAD_UNLOCK(curthread, pthread);
|
||||
|
Loading…
Reference in New Issue
Block a user