diff options
author | Christopher Faylor <me@cgf.cx> | 2000-10-13 02:15:47 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-10-13 02:15:47 +0400 |
commit | 1ec4f618feb517c020ff25784bedc66dd4f6f0e2 (patch) | |
tree | d146a1dab1ba5d6fcd6411bc85c783becac7f54a /winsup/cygwin/dcrt0.cc | |
parent | 5e0d760fb82d2d04c34306803253777aa5040fce (diff) |
* child_info: Bump child_info "version".
(child_info): Move some fields from child_info_spawn to here.
* cygheap.cc: Make cygheap pointers NOCOPY.
* dcrt0.cc (dll_crt0_1): Copy cygwin heap here regardless of whether we've been
forked or execed.
* dtable.cc (dtable::fixup_after_fork): Just release close-on-exec fds.
* exceptions.cc (stackdump): Respond to C warning.
* fork.cc: Reorganize to minimize stack copying.
(fork_child): New function.
(fork_parent): Ditto.
(sync_with_child): Don't suspend the forkee.
(sync_with_parent): Ditto. Make into a function.
* heap.cc (heap_init): Add some debugging output.
* path.cc (path_conv::check): Add an assertion.
(has_suffix): Ditto.
* security.cc (get_pw_sid): Defend against NULL.
* sigproc.cc (proc_subproc): Fix debugging output.
(wait_sig): Ditto.
* strace.cc: Make statics NO_COPY throughout.
(strace::vsprntf): Defend against NULL.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 05f5a8d48..4c8b42879 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -662,10 +662,13 @@ dll_crt0_1 () if (child_proc_info) { + cygheap = child_proc_info->cygheap; + cygheap_max = child_proc_info->cygheap_max; switch (child_proc_info->type) { case PROC_FORK: case PROC_FORK1: + cygheap_fixup_in_child (child_proc_info->parent, 0); alloc_stack (fork_info); set_myself (mypid); user_data->forkee = child_proc_info->cygpid; @@ -677,8 +680,6 @@ dll_crt0_1 () case PROC_EXEC: case PROC_SPAWN: HANDLE h; - cygheap = spawn_info->cygheap; - cygheap_max = spawn_info->cygheap_max; cygheap_fixup_in_child (spawn_info->parent, 1); if (!spawn_info->moreinfo->myself_pinfo || !DuplicateHandle (hMainProc, spawn_info->moreinfo->myself_pinfo, |