aboutsummaryrefslogtreecommitdiff
path: root/linuxthreads/pthread.c
diff options
context:
space:
mode:
Diffstat (limited to 'linuxthreads/pthread.c')
-rw-r--r--linuxthreads/pthread.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index f165ab1..8b1b14f 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -529,6 +529,10 @@ static void pthread_initialize(void)
sigemptyset(&mask);
sigaddset(&mask, __pthread_sig_restart);
sigprocmask(SIG_BLOCK, &mask, NULL);
+ /* And unblock __pthread_sig_cancel if it has been blocked. */
+ sigdelset(&mask, __pthread_sig_restart);
+ sigaddset(&mask, __pthread_sig_cancel);
+ sigprocmask(SIG_UNBLOCK, &mask, NULL);
/* Register an exit function to kill all other threads. */
/* Do it early so that user-registered atexit functions are called
before pthread_*exit_process. */