summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/dll_init.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-05-04 19:19:46 +0000
committerChristopher Faylor <me@cgf.cx>2011-05-04 19:19:46 +0000
commit975757698f521dffeb360ced0a5540a922856500 (patch)
treed056b6b1ced61f8d9ed549b3693f0a5c4d58ee30 /winsup/cygwin/dll_init.cc
parent3521d504804b8c43c93ade54c67716308c0c7d03 (diff)
downloadcygnal-975757698f521dffeb360ced0a5540a922856500.tar.gz
cygnal-975757698f521dffeb360ced0a5540a922856500.tar.bz2
cygnal-975757698f521dffeb360ced0a5540a922856500.zip
* dll_list::detach (dll_list::detach): Avoid doing anything with detach during
a failing fork.
Diffstat (limited to 'winsup/cygwin/dll_init.cc')
-rw-r--r--winsup/cygwin/dll_init.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/winsup/cygwin/dll_init.cc b/winsup/cygwin/dll_init.cc
index 99974944b..1b6072a47 100644
--- a/winsup/cygwin/dll_init.cc
+++ b/winsup/cygwin/dll_init.cc
@@ -181,7 +181,10 @@ void
dll_list::detach (void *retaddr)
{
dll *d;
- if (!myself)
+ /* Don't attempt to call destructors if we're still in fork processing
+ since that likely means fork is failing and everything will not have been
+ set up. */
+ if (!myself || in_forkee)
return;
guard (true);
if ((d = find (retaddr)))