* cygheap.cc (_cmalloc): Use correct constants for size calculation.

* dcrt0.cc (dll_crt0_1): Move uid initialization earlier.
* fork.cc (fork_parent): Move cygheap_setup_in_child to just prior to
CreateProcess so that all contents of cygheap are copied.
* spawn.cc (spawn_guts): Ditto.
This commit is contained in:
Christopher Faylor
2001-07-18 17:05:34 +00:00
parent c9fbce2641
commit 16828fc5d4
5 changed files with 17 additions and 7 deletions

View File

@@ -695,6 +695,7 @@ dll_crt0_1 ()
DUPLICATE_SAME_ACCESS | DUPLICATE_CLOSE_SOURCE))
h = NULL;
set_myself (mypid, h);
myself->uid = spawn_info->moreinfo->uid;
__argc = spawn_info->moreinfo->argc;
__argv = spawn_info->moreinfo->argv;
envp = spawn_info->moreinfo->envp;
@@ -709,7 +710,6 @@ dll_crt0_1 ()
}
if (child_proc_info->subproc_ready)
ProtectHandle (child_proc_info->subproc_ready);
myself->uid = spawn_info->moreinfo->uid;
if (myself->uid == USHRT_MAX)
cygheap->user.set_sid (NULL);
break;