* dll_init.cc (dll_global_dtors): Avoid calling destructors during failing

fork().
This commit is contained in:
Christopher Faylor 2011-05-04 16:02:45 +00:00
parent 54e4df33a2
commit 3521d50480
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2011-05-04 Christopher Faylor <me.cygwin2011@cgf.cx>
* dll_init.cc (dll_global_dtors): Avoid calling destructors during
failing fork().
2011-05-04 Corinna Vinschen <corinna@vinschen.de>
* fhandler.h (class fhandler_base): Remove uninterruptible_io status

View File

@ -37,6 +37,11 @@ static bool dll_global_dtors_recorded;
void
dll_global_dtors ()
{
/* 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 (in_forkee)
return;
int recorded = dll_global_dtors_recorded;
dll_global_dtors_recorded = false;
if (recorded && dlls.start.next)