diff options
author | Christopher Faylor <me@cgf.cx> | 2006-01-06 01:38:51 +0300 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2006-01-06 01:38:51 +0300 |
commit | 1b0000274430d098bfd3f3583b2b3d379788a053 (patch) | |
tree | f2ae1d46fe36bb07c012b40068738be96eeefd7d /winsup/cygwin/sigproc.cc | |
parent | 2ea1dced21310b3d419a5e2adfe3d5afdccd489b (diff) |
* 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.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r-- | winsup/cygwin/sigproc.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index fb45ed917..886cbdabe 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: |