diff options
author | Christopher Faylor <me@cgf.cx> | 2011-05-04 23:19:46 +0400 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2011-05-04 23:19:46 +0400 |
commit | 975757698f521dffeb360ced0a5540a922856500 (patch) | |
tree | d056b6b1ced61f8d9ed549b3693f0a5c4d58ee30 /winsup/cygwin/dll_init.cc | |
parent | 3521d504804b8c43c93ade54c67716308c0c7d03 (diff) |
* 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.cc | 5 |
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))) |