From 929a140824b8150683df0ce1f8bef0beec3a7f6c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 24 Aug 2011 15:18:17 +0000 Subject: * thread.cc (pthread::pthread): Drop setting parent_tls. Call sigprocmask to copy parent thread signal mask into new parent_sigmask member. (pthread::thread_init_wrapper): Copy _my_tls.sigmask from new parent_sigmask member. * thread.h (class pthread): Drop parent_tls. Add parent_sigmask. --- winsup/cygwin/thread.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/thread.cc') diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 953e0c9f8..2f7d79460 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -382,7 +382,7 @@ pthread::pthread ():verifyable_object (PTHREAD_MAGIC), win32_obj_id (0), { if (this != pthread_null::get_null_pthread ()) threads.insert (this); - parent_tls = &_my_tls; + sigprocmask (SIG_SETMASK, NULL, &parent_sigmask); } pthread::~pthread () @@ -1985,7 +1985,7 @@ pthread::thread_init_wrapper (void *arg) // if thread is detached force cleanup on exit if (thread->attr.joinable == PTHREAD_CREATE_DETACHED && thread->joiner == NULL) thread->joiner = thread; - _my_tls.sigmask = thread->parent_tls->sigmask; + _my_tls.sigmask = thread->parent_sigmask; thread->mutex.unlock (); thread_printf ("started thread %p %p %p %p %p %p", arg, &_my_tls.local_clib, -- cgit v1.2.3