From 1b0000274430d098bfd3f3583b2b3d379788a053 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Thu, 5 Jan 2006 22:38:51 +0000 Subject: * sigproc.cc (no_signals_available): Use existence of signal thread handle to figure out if we can actually send signals rather than relying on my_sendsig. (hwait_sig): Make static. (sigproc_init): Don't set my_sendsig to anything special. Use new global static hwait_sig. (wait_sig): Set hwait_sig to NULL when we are exiting. --- winsup/cygwin/ChangeLog | 10 ++++++++++ winsup/cygwin/sigproc.cc | 7 ++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index ff80caf..73d92b6 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,15 @@ 2006-01-05 Christopher Faylor + * sigproc.cc (no_signals_available): Use existence of signal thread + handle to figure out if we can actually send signals rather than + relying on my_sendsig. + (hwait_sig): Make static. + (sigproc_init): Don't set my_sendsig to anything special. Use new + global static hwait_sig. + (wait_sig): Set hwait_sig to NULL when we are exiting. + +2006-01-05 Christopher Faylor + * include/getopt.h: Accommodate recent unfortunate newlib changes. 2006-01-05 Christopher Faylor diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index fb45ed9..886cbda 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -39,7 +39,7 @@ details. */ #define WSSC 60000 // Wait for signal completion #define WPSP 40000 // Wait for proc_subproc mutex -#define no_signals_available(x) (!my_sendsig || ((x) && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls) +#define no_signals_available(x) (!hwait_sig || ((x) && myself->exitcode & EXITCODE_SET) || &_my_tls == _sig_tls) #define NPROCS 256 @@ -61,6 +61,7 @@ HANDLE NO_COPY signal_arrived; // Event signaled when a signal has HANDLE NO_COPY sigCONT; // Used to "STOP" a process +Static cygthread *hwait_sig; Static HANDLE wait_sig_inited; // Control synchronization of // message queue startup @@ -483,9 +484,8 @@ sigproc_init () */ sync_proc_subproc.init ("sync_proc_subproc"); - my_sendsig = INVALID_HANDLE_VALUE; // changed later sync_startup = NULL; - cygthread *hwait_sig = new cygthread (wait_sig, 0, cygself, "sig"); + hwait_sig = new cygthread (wait_sig, 0, cygself, "sig"); hwait_sig->zap_h (); global_sigs[SIGSTOP].sa_flags = SA_RESTART | SA_NODEFER; @@ -1141,6 +1141,7 @@ wait_sig (VOID *) } break; case __SIGEXIT: + hwait_sig = NULL; sigproc_printf ("saw __SIGEXIT"); break; /* handle below */ default: -- cgit v1.1