diff options
author | Christopher Faylor <me@cgf.cx> | 2001-01-28 05:51:15 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2001-01-28 05:51:15 +0000 |
commit | 2a6fc028badee6ab9a4df2b1b395dbb701d965fb (patch) | |
tree | 22d3b565c2f57907367012419b1c63765043d05d /winsup/cygwin/spawn.cc | |
parent | 022ce214de829810a9ddd1a747be03ac95185bb1 (diff) | |
download | cygnal-2a6fc028badee6ab9a4df2b1b395dbb701d965fb.tar.gz cygnal-2a6fc028badee6ab9a4df2b1b395dbb701d965fb.tar.bz2 cygnal-2a6fc028badee6ab9a4df2b1b395dbb701d965fb.zip |
Throughout, change 'cygwin_shared.mount' to 'mount_table'.
* child_info.h (child_info): Move shared_h, console_h to cygheap. Add mount_h.
* cygheap.h (init_cygheap): Add shared_h, console_h.
* cygheap.cc (init_cheap): Initialize heap at a fixed location after the shared
memory regions. Initialize cygheap->user name here.
* dcrt0.cc (dll_crt0_1): Call getpagesize () to initialize constants. Remove
cygheap_init since it is done in shared_init now.
(_dll_crt0): Initialize mount_h, remove shared_h and console_h initialization.
* fhandler_console.cc (console_shared_h): Eliminate.
(get_tty_stuff): Use cygheap->console_h rather than console_shared_h.
* heap.cc (heap_init): Use page size constant calculated earlier in
initialization.
* shared.cc: Eliminate cygwin_shared_h. Add cygwin_mount_h.
(mount_table_init): New function for initializing a user mount table.
(open_shared_file_map): Use constant for shared memory region. Initialize
cygheap and mount table here.
(open_shared): Improve debugging output.
(shared_info::initialize): Eliminate call to mount.init.
(shared_terminate): Use cygheap->shared_h. Close cygwin_mount_h.
(open_shared_file_map): Eliminate.
* shared_info.h (mount_info): Add a version field.
(shared_align_past): New macro for calculating location for shared memory
regions.
* sigproc.cc (init_child_info): Eliminate shared_h, console_h.
* spawn.cc (spawn_guts): Pass on cygwin_mount_h iff not a different user.
* syscalls.cc (system_info): New global holding system memory defaults.
(getpagesize): Use system_info.
* uinfo.cc (internal_getlogin): Only fill in user name if nonexistent.
* winsup.h: Declare system_info.
* passwd.cc (read_etc_passwd): Use cygheap->user.name () rather than retrieving
the name again.
Diffstat (limited to 'winsup/cygwin/spawn.cc')
-rw-r--r-- | winsup/cygwin/spawn.cc | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/winsup/cygwin/spawn.cc b/winsup/cygwin/spawn.cc index 030e6b6ab..cb30d6be7 100644 --- a/winsup/cygwin/spawn.cc +++ b/winsup/cygwin/spawn.cc @@ -28,6 +28,7 @@ details. */ #include "sigproc.h" #include "cygheap.h" #include "child_info.h" +#include "shared_info.h" #include "pinfo.h" #define NEED_VFORK #include "perthread.h" @@ -592,6 +593,9 @@ skip_arg_parsing: if (!hToken) { ciresrv.moreinfo->uid = getuid (); + /* 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; rc = CreateProcess (runpath, /* image name - with full path */ one_line.buf, /* what was passed to exec */ /* process security attrs */ |