diff options
Diffstat (limited to 'winsup/cygwin/cygheap.cc')
-rw-r--r-- | winsup/cygwin/cygheap.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc index 3d0ce4b1b..48262ca06 100644 --- a/winsup/cygwin/cygheap.cc +++ b/winsup/cygwin/cygheap.cc @@ -61,7 +61,10 @@ cygheap_fixup_in_child (bool execed) _csbrk ((char *) child_proc_info->cygheap_max - (char *) cygheap); child_copy (child_proc_info->parent, child_proc_info->dwProcessId, "cygheap", cygheap, cygheap_max); if (execed) - CloseHandle (child_proc_info->parent); + { + CloseHandle (child_proc_info->parent); + child_proc_info->parent = NULL; + } cygheap_init (); debug_fixup_after_fork_exec (); |