From a93b4154f1212b54d0658557e914003ea5b06b0e Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 18 Oct 2005 15:13:13 +0000 Subject: [PATCH] * sigproc.cc (child_info::sync): Use correct name when closing to prevent warnings when DEBUGGING. * spawn.cc (spawn_guts): Set myself.hProcess to pi.hProcess since this may have been zeroed by the previous sync. --- winsup/cygwin/ChangeLog | 7 +++++++ winsup/cygwin/sigproc.cc | 2 +- winsup/cygwin/spawn.cc | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 62201b7a2..cb6dcb549 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2005-10-18 Christopher Faylor + + * sigproc.cc (child_info::sync): Use correct name when closing to + prevent warnings when DEBUGGING. + * spawn.cc (spawn_guts): Set myself.hProcess to pi.hProcess since this + may have been zeroed by the previous sync. + 2005-10-18 Christopher Faylor * sigproc.cc (child_info::sync): Fix typo which caused hProcess to diff --git a/winsup/cygwin/sigproc.cc b/winsup/cygwin/sigproc.cc index fc8ea9147..86ac20c8b 100644 --- a/winsup/cygwin/sigproc.cc +++ b/winsup/cygwin/sigproc.cc @@ -848,7 +848,7 @@ child_info::sync (pid_t pid, HANDLE& hProcess, DWORD howlong) { if (type != _PROC_FORK && x == nsubproc_ready) { - ForceCloseHandle (hProcess); + ForceCloseHandle1 (hProcess, childhProcess); hProcess = NULL; } sigproc_printf ("process %d synchronized, WFMO returned %d", pid, x); diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 17c7e5828..269fb7491 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -814,6 +814,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, switch (mode) { case _P_OVERLAY: + myself.hProcess = pi.hProcess; if (!synced && !myself->wr_proc_pipe) { extern bool is_toplevel_proc; -- 2.43.5