* dll_list::detach (dll_list::detach): Avoid doing anything with detach during

a failing fork.
This commit is contained in:
Christopher Faylor 2011-05-04 19:19:46 +00:00
parent 3521d50480
commit 975757698f
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2011-05-04 Christopher Faylor <me.cygwin2011@cgf.cx>
* dll_list::detach (dll_list::detach): Avoid doing anything with detach
during a failing fork.
2011-05-04 Christopher Faylor <me.cygwin2011@cgf.cx>
* dll_init.cc (dll_global_dtors): Avoid calling destructors during

View File

@ -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)))