From 150f3bd16864bfb1a8ab10904924fcee7feeb621 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Fri, 16 Sep 2005 01:47:09 +0000 Subject: * 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. --- winsup/cygwin/sigproc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/sigproc.cc') 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; -- cgit v1.2.3