From 70300fdb1c4f0834f83441fcd3fa029e110a7c2e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 15 Feb 2008 17:53:11 +0000 Subject: Perform whitespace cleanup throughout. * dcrt0.cc (signal_shift_subtract): Eliminate ancient backwards compatibility. (check_sanity_and_sync): Ditto. * winsup.h (SIGTOMASK): Ditto. Just use constant in signal calculation. * include/cygwin/version: Remove backwards signal mask compatibility define. * path.cc (symlink_info::check_sysfile): Cosmetic change. * registry.cc (get_registry_hive_path): Remove unneeded variable. * exceptions.cc (handle_sigsuspend): Eliminate thread signal mask and use either main sigmask or current thread sigmask. (set_process_mask): Ditto. (sighold): Ditto. (sigrelse): Ditto. (sigset): Ditto. (set_process_mask_delta): Ditto. (_cygtls::call_signal_handler): Ditto. * fhandler_process.cc (format_process_status): Ditto. * fhandler_termios.cc (fhandler_termios::bg_check): Ditto. * pinfo.h (class pinfo): Ditto. * select.cc (pselect): Ditto. * signal.cc (sigprocmask): Ditto. (abort): Ditto. (sigpause): Ditto. (sigsend): Ditto. (wait_sig): Ditto. * thread.h (pthread::parent_tls): New member. * thread.cc (pthread::pthread): Record parent_tls here. (pthread::thread_init_wrapper): Initialize sigmask from parent thread. --- winsup/cygwin/thread.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'winsup/cygwin/thread.cc') diff --git a/winsup/cygwin/thread.cc b/winsup/cygwin/thread.cc index 7e52e3be9..380496873 100644 --- a/winsup/cygwin/thread.cc +++ b/winsup/cygwin/thread.cc @@ -376,6 +376,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; } pthread::~pthread () @@ -1738,6 +1739,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; thread->mutex.unlock (); thread_printf ("started thread %p %p %p %p %p %p", arg, &_my_tls.local_clib, -- cgit v1.2.3