diff options
author | Christopher Faylor <me@cgf.cx> | 2002-10-19 00:57:06 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2002-10-19 00:57:06 +0000 |
commit | a85860b5c868d7c3865e5d912916e51a55014ac7 (patch) | |
tree | a7f99789423abe1e850561f21ac783290c9d0195 /winsup/cygwin/dcrt0.cc | |
parent | 824166e620dcffbd338795d6944281bc022e9ecf (diff) | |
download | cygnal-a85860b5c868d7c3865e5d912916e51a55014ac7.tar.gz cygnal-a85860b5c868d7c3865e5d912916e51a55014ac7.tar.bz2 cygnal-a85860b5c868d7c3865e5d912916e51a55014ac7.zip |
* dcrt0.cc (dll_crt0_1): Initialize cygwin threads here only when not forking.
* fork.cc (fork_child): Initialize cygwin thread later in process to avoid
allocating memory for thread stacks.
* shared.cc (open_shared): Issue warning if NT and shared segment is relocated.
Diffstat (limited to 'winsup/cygwin/dcrt0.cc')
-rw-r--r-- | winsup/cygwin/dcrt0.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 4270c58a4..64d5e2230 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -573,7 +573,10 @@ dll_crt0_1 () char **envp = NULL; if (!child_proc_info) - memory_init (); + { + memory_init (); + cygthread::init (); + } else { bool close_ppid_handle = false; @@ -616,6 +619,7 @@ dll_crt0_1 () old_title = strcpy (title_buf, spawn_info->moreinfo->old_title); cfree (spawn_info->moreinfo->old_title); } + cygthread::init (); break; } if (close_hexec_proc) @@ -624,8 +628,6 @@ dll_crt0_1 () CloseHandle (child_proc_info->pppid_handle); } - cygthread::init (); - ProtectHandle (hMainProc); ProtectHandle (hMainThread); |