summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/sigproc.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-10-19 00:22:08 +0000
committerChristopher Faylor <me@cgf.cx>2005-10-19 00:22:08 +0000
commitb72a5c0767780b0280e145c8ad686e007fbea0a5 (patch)
tree7763b3c019e40952ea110c7e174ea13084a7a1fd /winsup/cygwin/sigproc.cc
parent1f5c3042d581783dfd8ed8495ef704e9ae325cd2 (diff)
downloadcygnal-b72a5c0767780b0280e145c8ad686e007fbea0a5.tar.gz
cygnal-b72a5c0767780b0280e145c8ad686e007fbea0a5.tar.bz2
cygnal-b72a5c0767780b0280e145c8ad686e007fbea0a5.zip
* cygtls.cc (handle_threadlist_exception): Improve diagnostic output.
* sigproc.cc (child_info::sync): Only clear hProcess when execing. (wait_sig): Protect readsig handle.
Diffstat (limited to 'winsup/cygwin/sigproc.cc')
-rw-r--r--winsup/cygwin/sigproc.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc
index 86ac20c8b..ae44ad7f1 100644
--- a/winsup/cygwin/sigproc.cc
+++ b/winsup/cygwin/sigproc.cc
@@ -846,7 +846,7 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong)
}
else
{
- if (type != _PROC_FORK && x == nsubproc_ready)
+ if (type == _PROC_EXEC && x == nsubproc_ready)
{
ForceCloseHandle1 (hProcess, childhProcess);
hProcess = NULL;
@@ -1057,6 +1057,7 @@ wait_sig (VOID *)
if (!CreatePipe (&readsig, &myself->sendsig, sec_user_nih (sa_buf), 0))
api_fatal ("couldn't create signal pipe, %E");
+ ProtectHandle (readsig);
sigCONT = CreateEvent (&sec_none_nih, FALSE, FALSE, NULL);
my_sendsig = myself->sendsig;
@@ -1186,7 +1187,7 @@ wait_sig (VOID *)
break;
}
- CloseHandle (readsig);
+ ForceCloseHandle (readsig);
sigproc_printf ("signal thread exiting");
ExitThread (0);
}