From ff4d6f1bd55896bdda546bacd9689dbfb24ecacf Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 3 Apr 2003 18:53:31 +0000 Subject: [PATCH] Update. 2003-04-03 Jakub Jelinek * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel in case the parent blocked it. --- linuxthreads/ChangeLog | 5 +++++ linuxthreads/pthread.c | 4 ++++ sysdeps/unix/sysv/linux/getsysstats.c | 2 +- 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/linuxthreads/ChangeLog b/linuxthreads/ChangeLog index 38d5cce..60d3065 100644 --- a/linuxthreads/ChangeLog +++ b/linuxthreads/ChangeLog @@ -1,3 +1,8 @@ +2003-04-03 Jakub Jelinek + + * pthread.c (pthread_initialize): Unblock __pthread_sig_cancel + in case the parent blocked it. + 2003-04-02 Jakub Jelinek * Makefile (libpthread-routines): Add pthread_atfork. 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. */ diff --git a/sysdeps/unix/sysv/linux/getsysstats.c b/sysdeps/unix/sysv/linux/getsysstats.c index 71e90fe..69dabd1 100644 --- a/sysdeps/unix/sysv/linux/getsysstats.c +++ b/sysdeps/unix/sysv/linux/getsysstats.c @@ -85,7 +85,7 @@ get_proc_path (char *buffer, size_t bufsize) /* Now store the copied value. But do it atomically. */ assert (sizeof (long int) == sizeof (void *__unbounded)); - if (! atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL)) + if (atomic_compare_and_exchange_bool_acq (&mount_proc, copy_result, NULL)) /* Replacing the value failed. This means another thread was faster and we don't need the copy anymore. */ free (copy_result); -- 2.7.4