* globals.cc (exit_status): Add new ES_EXIT_STARTING enum.

* dcrt0.cc (cygwin_exit): Set exit_state to ES_EXIT_STARTING prior to calling
real exit.
* dll_init.cc (dll_list::detach): Remove dll from linked list and call
destructors even if exiting.  Don't call __cxa_finalize in exiting case.
This commit is contained in:
Christopher Faylor
2010-03-28 17:27:52 +00:00
parent 84fef941e8
commit c019a66c32
4 changed files with 14 additions and 2 deletions

View File

@ -1127,6 +1127,7 @@ cygwin_atexit (void (*fn) (void))
extern "C" void
cygwin_exit (int n)
{
exit_state = ES_EXIT_STARTING;
exit (n);
}