From 5457dfcb8174f0ff25a0522050c1d79e710a68df Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 17 Jul 2001 03:41:52 +0000 Subject: * child_info.h: Bump magic number. (class child_info): Add an element. * cygheap.cc (init_cheap): Allocate cygwin heap in shared memory area. (cygheap_fixup_in_child): Map cygwin heap, passed from parent via shared memory into correct address. (cygheap_setup_for_child): New function. * cygheap.h: Declare new functions. * dcrt0.cc (dll_crt0_1): Accomodate new cygheap_fixup_in_child arguments. Avoid protecting subproc_ready unless it is spawn/nowait. * fork.cc (fork_parent): Use new cygheap_setup_for_child function to setup cygwin heap info. Close passed cygheap shared memory handle. * spawn.cc (spawn_guts): Ditto. Also, reorganize to avoid synchronization between parent and child in non-P_OVERLAY case. * sigproc.cc (wait_sig): Only signal subproc_ready when execing. --- winsup/cygwin/fork.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index ac9f855e9..5c7bad339 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -442,8 +442,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll, RevertToSelf (); ch.parent = hParent; - ch.cygheap = cygheap; - ch.cygheap_max = cygheap_max; + cygheap_setup_for_child (&ch); #ifdef DEBUGGING if (npid_max) { @@ -477,6 +476,7 @@ out: &pi); CloseHandle (hParent); + ForceCloseHandle1 (ch.cygheap_h, passed_cygheap_h); if (!rc) { -- cgit v1.2.3