aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-17 01:27:31 +0000
committerChristopher Faylor <me@cgf.cx>2005-05-17 01:27:31 +0000
commit4f7544bc9719ad4b68d4ce185d859699d8523506 (patch)
tree2ae73f71a7f3370556be0bb3cdcbf8e4045d5d84 /winsup
parentac674bc8966184389f1f745790d2372922fe2a00 (diff)
downloadnewlib-4f7544bc9719ad4b68d4ce185d859699d8523506.zip
newlib-4f7544bc9719ad4b68d4ce185d859699d8523506.tar.gz
newlib-4f7544bc9719ad4b68d4ce185d859699d8523506.tar.bz2
* dcrt0.cc (dll_crt0_0): Don't do fixup_after_exec if dynamically loaded since
the state of fds is unknown at this point.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dcrt0.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index c2bba38..0822486 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,5 +1,10 @@
2005-05-16 Christopher Faylor <cgf@timesys.com>
+ * 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 <cgf@timesys.com>
+
* include/sys/cygwin.h (enum cygwin_getinfo_types): Add CW_DEBUG_SELF.
* external.cc (cygwin_internal): Implement CW_DEBUG_SELF.
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index f211e45..4f643ae 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)
{