diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-14 20:25:52 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-14 20:25:52 +0000 |
commit | 54030e2146f80ba055f4b7efa20467beab1487e9 (patch) | |
tree | 4eb9e9497c025084a7aa7bba85b31b76fbcb9d54 /winsup/cygwin/dcrt0.cc | |
parent | c14ae835c5cf49ffd575455e6cd328f8ada7fd20 (diff) | |
download | cygnal-54030e2146f80ba055f4b7efa20467beab1487e9.tar.gz cygnal-54030e2146f80ba055f4b7efa20467beab1487e9.tar.bz2 cygnal-54030e2146f80ba055f4b7efa20467beab1487e9.zip |
* child_info.h (CURR_CHILD_INFO_MAGIC): Reset.
(child_info_fork::heaptop): Remove obsolete element.
(child_info_fork::heabbase): Ditto.
(child_info_fork::heapptr): Ditto.
(child_info_fork::mount_table): New element.
(child_info_fork::myself_addr): Ditto.
* dcrt0.cc (dll_crt0_1): Set mount_table and myself_addr when forking.
(initial_env): Add newline to "sleeping" message.
* dll_init.cc (reserve_upto): Accommodate cygwin heap when freeing memory.
Make debugging output a little more descriptive.
* fork.cc (fork_parent): Save mount_table and myself_addr.
* pinfo.cc (myself_addr): New variable.
(set_myself): Pass PID_MYSELF flag to init.
(pinfo::Init): Honor PID_MYSELF. Save address where myself shared memory
resides in myself_addr, for fork.
* pinfo.h (myself_addr): Declare.
* shared.cc (memory_init): On fork, use previously saved address for location
of mount table.
* include/sys/cygwin.h (PID_MYSELF): New value.
* dtable.cc (dtable::stdio_init): Don't pass access type to
init_std_file_from_handle. It's always the same.
(dtable::init_std_file_from_handle): Remove access type argument. Assume
read/write.
* dtable.h (dtable::init_std_file_from_handle): Ditto for declaration.
* exceptions.cc (try_to_debug): Don't try to debug if already being debugged.
* fhandler_console.cc (shared_console_info_save): New variable.
(fhandler_console::get_tty_stuff): Save address of shared console stuff for
fork.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 36442fceb..e7babe08b 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -581,6 +581,8 @@ dll_crt0_1 () case _PROC_FORK: cygheap_fixup_in_child (0); alloc_stack (fork_info); + mount_table = fork_info->mount_table; + myself_addr = fork_info->myself_addr; set_myself (mypid); close_ppid_handle = !!child_proc_info->pppid_handle; break; @@ -793,7 +795,7 @@ initial_env () DWORD ms = atoi (buf); buf[0] = '\0'; len = GetModuleFileName (NULL, buf, MAX_PATH); - console_printf ("Sleeping %d, pid %u %s", ms, GetCurrentProcessId (), buf); + console_printf ("Sleeping %d, pid %u %s\n", ms, GetCurrentProcessId (), buf); Sleep (ms); } if (GetEnvironmentVariable ("CYGWIN_DEBUG", buf, sizeof (buf) - 1)) |