From 4f7544bc9719ad4b68d4ce185d859699d8523506 Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 17 May 2005 01:27:31 +0000 Subject: [PATCH] * dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically loaded since the state of fds is unknown at this point. --- 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 c2bba384e..08224861b 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2005-05-16 Christopher Faylor + + * dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically + loaded since the state of fds is unknown at this point. + 2005-05-16 Christopher Faylor * include/sys/cygwin.h (enum cygwin_getinfo_types): Add CW_DEBUG_SELF. diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc index f211e4578..4f643ae1e 100644 --- a/winsup/cygwin/dcrt0.cc +++ b/winsup/cygwin/dcrt0.cc @@ -650,7 +650,6 @@ dll_crt0_0 () (void) SetErrorMode (SEM_FAILCRITICALERRORS); - device::init (); do_global_ctors (&__CTOR_LIST__, 1); cygthread::init (); @@ -686,7 +685,8 @@ dll_crt0_0 () __argv = spawn_info->moreinfo->argv; envp = spawn_info->moreinfo->envp; envc = spawn_info->moreinfo->envc; - cygheap->fdtab.fixup_after_exec (); + if (!dynamically_loaded) + cygheap->fdtab.fixup_after_exec (); signal_fixup_after_exec (); if (spawn_info->moreinfo->old_title) {