From 9749fd082fb5f6dfc0cbcb638425cfd169bdd54c Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Tue, 22 Apr 2008 20:56:26 +0000 Subject: [PATCH] * dcrt0.cc (dll_crt0_0): Move CWD initialization from here... (dll_crt0_1): ...to here. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/dcrt0.cc | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 65926b055..c0b8a41a0 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2008-04-22 Corinna Vinschen + + * dcrt0.cc (dll_crt0_0): Move CWD initialization from here... + (dll_crt0_1): ...to here. + 2008-04-22 Corinna Vinschen * cygwin.din (fmemopen): Export. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index 468d0ab39..7b299d3dd 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -751,8 +751,6 @@ dll_crt0_0 () events_init (); tty_list::init_session (); - cygheap->cwd.init (); - debug_printf ("finished dll_crt0_0 initialization"); } @@ -775,6 +773,8 @@ dll_crt0_1 (void *) ProtectHandle (hMainProc); ProtectHandle (hMainThread); + cygheap->cwd.init (); + /* Initialize pthread mainthread when not forked and it is safe to call new, otherwise it is reinitalized in fixup_after_fork */ if (!in_forkee)