From 54030e2146f80ba055f4b7efa20467beab1487e9 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Mon, 14 Oct 2002 20:25:52 +0000 Subject: * 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. --- winsup/cygwin/child_info.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'winsup/cygwin/child_info.h') diff --git a/winsup/cygwin/child_info.h b/winsup/cygwin/child_info.h index 1aca7247b..4cc09b74b 100644 --- a/winsup/cygwin/child_info.h +++ b/winsup/cygwin/child_info.h @@ -29,7 +29,7 @@ enum #define EXEC_MAGIC_SIZE sizeof(child_info) -#define CURR_CHILD_INFO_MAGIC 0xb3836013U +#define CURR_CHILD_INFO_MAGIC 0x64848c11U /* NOTE: Do not make gratuitous changes to the names or organization of the below class. The layout is checksummed to determine compatibility between @@ -53,14 +53,16 @@ public: unsigned fhandler_union_cb; }; +class mount_info; +class _pinfo; + class child_info_fork: public child_info { public: HANDLE forker_finished;// for synchronization with child DWORD stacksize; // size of parent stack - void *heaptop; - void *heapbase; - void *heapptr; + mount_info *mount_table;// location of mount table in parent + _pinfo *myself_addr; // where myself shared memory lives in the parent jmp_buf jmp; // where child will jump to void *stacktop; // location of top of parent stack void *stackbottom; // location of bottom of parent stack -- cgit v1.2.3