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-05-06 14:05:46 +0400
committerCorinna Vinschen <corinna@vinschen.de>2002-05-06 14:05:46 +0400
commita9917779940a314185fa33c177a45fd12502935c (patch)
tree9f4a874d8b7c7eb8a9d318d4790017acedba59a1 /winsup/cygwin/fork.cc
parent3d9bc8a6171538504fc61aac2a1e43022b334034 (diff)
* spawn.cc (spawn_guts): Move call to set_process_privilege()
to load_registry_hive(). * registry.cc (load_registry_hive): ditto. * fork.cc (fork_parent): Call sec_user_nih() only once.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r--winsup/cygwin/fork.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc
index 66f2d220f..b0c893dce 100644
--- a/winsup/cygwin/fork.cc
+++ b/winsup/cygwin/fork.cc
@@ -466,6 +466,7 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
#endif
char sa_buf[1024];
+ PSECURITY_ATTRIBUTES sec_attribs = sec_user_nih (sa_buf);
syscall_printf ("CreateProcess (%s, %s, 0, 0, 1, %x, 0, 0, %p, %p)",
myself->progname, myself->progname, c_flags, &si, &pi);
__malloc_lock (_reent_clib ());
@@ -473,8 +474,8 @@ fork_parent (HANDLE& hParent, dll *&first_dll,
newheap = cygheap_setup_for_child (&ch,cygheap->fdtab.need_fixup_before ());
rc = CreateProcess (myself->progname, /* image to run */
myself->progname, /* what we send in arg0 */
- sec_user_nih (sa_buf),
- sec_user_nih (sa_buf),
+ sec_attribs,
+ sec_attribs,
TRUE, /* inherit handles from parent */
c_flags,
NULL, /* environment filled in later */