diff options
author | Christopher Faylor <me@cgf.cx> | 2000-07-03 20:16:23 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2000-07-03 20:16:23 +0000 |
commit | 3b09c754da824fccaa85c4f1219599032e9a0676 (patch) | |
tree | fd5b5f709ce73020aa2c70fcfc6610675fb47a7d /winsup/cygwin/fork.cc | |
parent | 8366e93be9f55449a38d8640caf454640e5e9105 (diff) | |
download | newlib-3b09c754da824fccaa85c4f1219599032e9a0676.zip newlib-3b09c754da824fccaa85c4f1219599032e9a0676.tar.gz newlib-3b09c754da824fccaa85c4f1219599032e9a0676.tar.bz2 |
Revert errnoneous commit.
Diffstat (limited to 'winsup/cygwin/fork.cc')
-rw-r--r-- | winsup/cygwin/fork.cc | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index 4015838..54c6681 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -445,13 +445,13 @@ fork () MALLOC_CHECK; - rc = fork_copy (pi, "dll data", dll_data_start, dll_data_end, - dll_bss_start, dll_bss_end, NULL); rc = fork_copy (pi, "user/cygwin data", user_data->data_start, user_data->data_end, user_data->bss_start, user_data->bss_end, + ch.heapbase, ch.heapptr, stack_here, ch.stackbottom, - NULL); + dll_data_start, dll_data_end, + dll_bss_start, dll_bss_end, NULL); MALLOC_CHECK; if (!rc) @@ -526,22 +526,14 @@ fork () } sync_with_parent ("after longjmp.", TRUE); + ProtectHandle (hParent); #ifdef DEBUGGING char c; if (GetEnvironmentVariable ("FORKDEBUG", &c, 1)) try_to_debug (); - char buf[80]; - if (GetEnvironmentVariable ("CYGWIN_FORK_SLEEP", buf, sizeof (buf))) - { - small_printf ("Sleeping %d after fork, pid %u\n", atoi (buf), GetCurrentProcessId ()); - Sleep (atoi(buf)); - } #endif - heap_init (); - ProtectHandle (hParent); - /* If we've played with the stack, stacksize != 0. That means that fork() was invoked from other than the main thread. Make sure that when the "main" thread exits it calls do_exit, like a normal process. |