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>2002-10-15 00:25:52 +0400
committerChristopher Faylor <me@cgf.cx>2002-10-15 00:25:52 +0400
commit54030e2146f80ba055f4b7efa20467beab1487e9 (patch)
tree4eb9e9497c025084a7aa7bba85b31b76fbcb9d54 /winsup/cygwin/cygheap.cc
parentc14ae835c5cf49ffd575455e6cd328f8ada7fd20 (diff)
* 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/cygheap.cc')
-rw-r--r--winsup/cygwin/cygheap.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/winsup/cygwin/cygheap.cc b/winsup/cygwin/cygheap.cc
index d3d1bd610..e4ea673d0 100644
--- a/winsup/cygwin/cygheap.cc
+++ b/winsup/cygwin/cygheap.cc
@@ -25,9 +25,9 @@
#include "shared_info.h"
init_cygheap NO_COPY *cygheap;
-void NO_COPY *cygheap_max = NULL;
+void NO_COPY *cygheap_max;
-static NO_COPY muto *cygheap_protect = NULL;
+static NO_COPY muto *cygheap_protect;
struct cygheap_entry
{
@@ -63,7 +63,7 @@ init_cheap ()
cygheap_max = cygheap;
}
-// static void dup_now (void *, child_info *, unsigned) __attribute__ ((regparm(3)));
+static void dup_now (void *, child_info *, unsigned) __attribute__ ((regparm(3)));
static void
dup_now (void *newcygheap, child_info *ci, unsigned n)
{
@@ -78,7 +78,6 @@ cygheap_setup_for_child (child_info *ci, bool dup_later)
{
void *newcygheap;
cygheap_protect->acquire ();
-if (!ci) try_to_debug ();
unsigned n = (char *) cygheap_max - (char *) cygheap;
unsigned size = CYGHEAPSIZE;
if (size < n)