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:
authorChristopher Faylor <me@cgf.cx>2001-07-18 21:05:34 +0400
committerChristopher Faylor <me@cgf.cx>2001-07-18 21:05:34 +0400
commit16828fc5d4c7a335fae49be1d3f823b655825da8 (patch)
tree50a03015b90a4920d3b23933f3a8620fc55f80dd /winsup/cygwin/spawn.cc
parentc9fbce2641e2e82438ca84b423216aff2c61cdd8 (diff)
* 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.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r--winsup/cygwin/spawn.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc
index 059e070a0..1603f446a 100644
--- a/winsup/cygwin/spawn.cc
+++ b/winsup/cygwin/spawn.cc
@@ -542,7 +542,8 @@ spawn_guts (HANDLE hToken, const char * prog_arg, const char *const *argv,
*c++ = cstrdup1 (*e++);
*c = NULL;
if (mode != _P_OVERLAY ||
- !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc, &ciresrv.moreinfo->myself_pinfo, 0,
+ !DuplicateHandle (hMainProc, myself.shared_handle (), hMainProc,
+ &ciresrv.moreinfo->myself_pinfo, 0,
TRUE, DUPLICATE_SAME_ACCESS))
ciresrv.moreinfo->myself_pinfo = NULL;
@@ -578,8 +579,6 @@ skip_arg_parsing:
else
envblock = winenv (envp, 0);
- cygheap_setup_for_child (&ciresrv);
-
/* Preallocated buffer for `sec_user' call */
char sa_buf[1024];
@@ -598,6 +597,7 @@ skip_arg_parsing:
/* FIXME: This leaks a handle in the CreateProcessAsUser case since the
child process doesn't know about cygwin_mount_h. */
ciresrv.mount_h = cygwin_mount_h;
+ cygheap_setup_for_child (&ciresrv);
rc = CreateProcess (runpath, /* image name - with full path */
one_line.buf, /* what was passed to exec */
/* process security attrs */
@@ -652,6 +652,7 @@ skip_arg_parsing:
strcat (wstname, dskname);
si.lpDesktop = wstname;
+ cygheap_setup_for_child (&ciresrv);
rc = CreateProcessAsUser (hToken,
runpath, /* image name - with full path */
one_line.buf, /* what was passed to exec */