Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2002-03-11 20:57:22 +0300
committerCorinna Vinschen <corinna@vinschen.de>2002-03-11 20:57:22 +0300
commit713fb38b7c3f6bcf1d0c1bd845d2264b19a82439 (patch)
treea4c124b8d85c113c94113fc2cdb6fb52b89580ff /winsup/cygwin/fork.cc
parenteabb48d53d6bfa3f8dd3564a6b789b6d37c94b65 (diff)
* fork.cc (fork_child): Call fixup_mmaps_after_fork() before
closing parent process handle. Call fixup_mmaps_after_fork() with parent process handle as parameter. * mmap.cc (mmap_record::access): New method. (fixup_mmaps_after_fork): Take process handle as parameter. In case of FILE_MAP_COPY access, copy valid memory regions to child. * pinfo.h (fixup_mmaps_after_fork): Change prototype accordingly.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index f7133df6b..03d17ee65 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -296,13 +296,13 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
sync_with_parent ("loaded dlls", TRUE);
}
+ if (fixup_mmaps_after_fork (hParent))
+ api_fatal ("recreate_mmaps_after_fork_failed");
+
ForceCloseHandle (hParent);
(void) ForceCloseHandle (child_proc_info->subproc_ready);
(void) ForceCloseHandle (child_proc_info->forker_finished);
- if (fixup_mmaps_after_fork ())
- api_fatal ("recreate_mmaps_after_fork_failed");
-
if (fixup_shms_after_fork ())
api_fatal ("recreate_shm areas after fork failed");