aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2006-01-05 22:38:51 +0000
committerChristopher Faylor <me@cgf.cx>2006-01-05 22:38:51 +0000
commit1b0000274430d098bfd3f3583b2b3d379788a053 (patch)
treef2ae1d46fe36bb07c012b40068738be96eeefd7d
parent2ea1dced21310b3d419a5e2adfe3d5afdccd489b (diff)
downloadnewlib-1b0000274430d098bfd3f3583b2b3d379788a053.zip
newlib-1b0000274430d098bfd3f3583b2b3d379788a053.tar.gz
newlib-1b0000274430d098bfd3f3583b2b3d379788a053.tar.bz2
* 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.
-rw-r--r--winsup/cygwin/ChangeLog10
-rw-r--r--winsup/cygwin/sigproc.cc7
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 <cgf@timesys.com>
+ * 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 <cgf@timesys.com>
+
* include/getopt.h: Accommodate recent unfortunate newlib changes.
2006-01-05 Christopher Faylor <cgf@timesys.com>
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: