Actually delete SIGCANCEL mask for suspended thread, so the signal will not
be masked when it is resumed.
This commit is contained in:
parent
2b1c6615bc
commit
a9a11568ff
@ -168,6 +168,7 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
|
|||||||
SIGDELSET(set, SIGTRAP);
|
SIGDELSET(set, SIGTRAP);
|
||||||
__sys_sigprocmask(SIG_SETMASK, &set, &oset);
|
__sys_sigprocmask(SIG_SETMASK, &set, &oset);
|
||||||
new_thread->sigmask = oset;
|
new_thread->sigmask = oset;
|
||||||
|
SIGDELSET(new_thread->sigmask, SIGCANCEL);
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = thr_new(¶m, sizeof(param));
|
ret = thr_new(¶m, sizeof(param));
|
||||||
@ -181,10 +182,8 @@ _pthread_create(pthread_t * thread, const pthread_attr_t * attr,
|
|||||||
ret = EAGAIN;
|
ret = EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create_suspended) {
|
if (create_suspended)
|
||||||
__sys_sigprocmask(SIG_SETMASK, &oset, NULL);
|
__sys_sigprocmask(SIG_SETMASK, &oset, NULL);
|
||||||
SIGDELSET(oset, SIGCANCEL);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
if (!locked)
|
if (!locked)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user