diff options
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 462cea7aa..c6750b4db 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -675,7 +675,7 @@ skip_arg_parsing: MALLOC_CHECK; if (envblock) free (envblock); - ForceCloseHandle1 (ciresrv.cygheap_h, passed_cygheap_h); + cygheap_setup_for_child_cleanup (&ciresrv); MALLOC_CHECK; /* Set errno now so that debugging messages from it appear before our @@ -718,6 +718,7 @@ skip_arg_parsing: strace.execing = 1; hExeced = pi.hProcess; strcpy (myself->progname, real_path); + close_all_files (); } else { |