summaryrefslogtreecommitdiff
path: root/linuxthreads
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-08-20 19:01:29 +0000
committerUlrich Drepper <drepper@redhat.com>1999-08-20 19:01:29 +0000
commitd2e1ff28894a7b02960d4f0449d2046ccaa183a8 (patch)
tree8a1664973ac4f73c5c137e0bda09aede37cab099 /linuxthreads
parent3756823b75612cc48f0feadec993feb3df5f0021 (diff)
(__pthread_kill_other_threads_np): Reset signal handlers for the
signals we used in the thread implementation here.
Diffstat (limited to 'linuxthreads')
-rw-r--r--linuxthreads/pthread.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/linuxthreads/pthread.c b/linuxthreads/pthread.c
index b2c0981abd..9a21c5cb3f 100644
--- a/linuxthreads/pthread.c
+++ b/linuxthreads/pthread.c
@@ -661,11 +661,22 @@ void __pthread_reset_main_thread()
void __pthread_kill_other_threads_np(void)
{
+ struct sigaction sa;
/* Terminate all other threads and thread manager */
pthread_exit_process(0, NULL);
/* Make current thread the main thread in case the calling thread
changes its mind, does not exec(), and creates new threads instead. */
__pthread_reset_main_thread();
+ /* Reset the signal handlers behaviour for the signals the
+ implementation uses since this would be passed to the new
+ process. */
+ sigemptyset(&sa.sa_mask);
+ sa.sa_flags = 0;
+ sa.sa_handler = SIG_DFL;
+ __sigaction(__pthread_sig_restart, &sa, NULL);
+ __sigaction(__pthread_sig_cancel, &sa, NULL);
+ if (__pthread_sig_debug > 0)
+ __sigaction(__pthread_sig_debug, &sa, NULL);
}
weak_alias (__pthread_kill_other_threads_np, pthread_kill_other_threads_np)