summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-09-16 01:47:09 +0000
committerChristopher Faylor <me@cgf.cx>2005-09-16 01:47:09 +0000
commit150f3bd16864bfb1a8ab10904924fcee7feeb621 (patch)
tree2abfee9cba967c6227d2391575f19210ecd6ade1 /winsup/cygwin/sigproc.cc
parenta3a9aac72d82414427d0f020b74a12c26905426c (diff)
downloadcygnal-150f3bd16864bfb1a8ab10904924fcee7feeb621.tar.gz
cygnal-150f3bd16864bfb1a8ab10904924fcee7feeb621.tar.bz2
cygnal-150f3bd16864bfb1a8ab10904924fcee7feeb621.zip
* sigproc.cc (no_signals_available): Return true if sending to self from the
signal thread. (wait_sig): Correct so that WaitForSingleObject is called when hMainThread is != 0, rather than the reverse. * cygheap.cc (cygheap_fixup_in_child): Clarify potential error message. * fork.cc (fork_copy): Cosmetic change.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index ede777fb8..af87e1e02 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -38,7 +38,7 @@ details. */
#define WSSC 60000 // Wait for signal completion
#define WPSP 40000 // Wait for proc_subproc mutex
-#define no_signals_available() (!hwait_sig || (myself->exitcode & EXITCODE_SET) && !my_sendsig)
+#define no_signals_available() (!hwait_sig || (myself->exitcode & EXITCODE_SET) || !my_sendsig || &_my_tls == _sig_tls)
#define NPROCS 256
@@ -1127,7 +1127,7 @@ wait_sig (VOID *self)
HANDLE h = hMainThread;
my_sendsig = hMainThread = NULL;
- DWORD res = h ? WAIT_OBJECT_0 : WaitForSingleObject (h, INFINITE);
+ DWORD res = !h ? WAIT_OBJECT_0 : WaitForSingleObject (h, INFINITE);
DWORD exitcode = 1;