diff options
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index b161b987a..f0187e23b 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -784,7 +784,7 @@ spawn_guts (const char * prog_arg, const char *const *argv, rc ? cygpid : (unsigned int) -1, prog_arg, one_line.buf); /* Name the handle similarly to proc_subproc. */ - ProtectHandle (pi.hProcess); + ProtectHandle1 (pi.hProcess, childhProc); bool wait_for_myself = false; if (mode == _P_OVERLAY) @@ -802,7 +802,6 @@ spawn_guts (const char * prog_arg, const char *const *argv, this). */ if (!myself->wr_proc_pipe) { - myself.hProcess = pi.hProcess; myself.remember (); wait_for_myself = true; myself->wr_proc_pipe = INVALID_HANDLE_VALUE; @@ -855,8 +854,6 @@ if (wait_for_myself) else ciresrv.sync (myself, INFINITE); -ForceCloseHandle (pi.hProcess); - switch (mode) { case _P_OVERLAY: |