* 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

@ -442,7 +442,6 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
RevertToSelf ();
ch.parent = hParent;
cygheap_setup_for_child (&ch);
#ifdef DEBUGGING
if (npid_max)
{
@ -464,6 +463,7 @@ out:
char sa_buf[1024];
syscall_printf ("CreateProcess (%s, %s, 0, 0, 1, %x, 0, 0, %p, %p)",
myself->progname, myself->progname, c_flags, &si, &pi);
cygheap_setup_for_child (&ch);
rc = CreateProcess (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
allow_ntsec ? sec_user (sa_buf) : &sec_none_nih,