* dcrt0.cc (do_global_dtors): Don't call dll_global_dtors here.
(__main): Reinstate atexit of do_global_dtors. (cygwin_exit): Call dll_global_dtors here. (do_exit): And here.
This commit is contained in:
parent
98c2367bf4
commit
3ac78fd612
|
@ -1,3 +1,11 @@
|
|||
2005-05-11 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* dcrt0.cc (do_global_dtors): Don't call dll_global_dtors here.
|
||||
(__main): Reinstate atexit of do_global_dtors.
|
||||
(cygwin_exit): Call dll_global_dtors here.
|
||||
(do_exit): And here.
|
||||
|
||||
|
||||
2005-05-10 Christopher Faylor <cgf@timesys.com>
|
||||
|
||||
* cygtls.cc (_cygtls::remove): Clear exitsock after close.
|
||||
|
|
|
@ -129,9 +129,8 @@ char *old_title;
|
|||
char title_buf[TITLESIZE + 1];
|
||||
|
||||
static void
|
||||
do_global_dtors (void)
|
||||
do_global_dtors ()
|
||||
{
|
||||
dll_global_dtors ();
|
||||
void (**pfunc) () = user_data->dtors;
|
||||
if (pfunc)
|
||||
{
|
||||
|
@ -982,6 +981,7 @@ extern "C" void
|
|||
__main (void)
|
||||
{
|
||||
do_global_ctors (user_data->ctors, false);
|
||||
atexit (do_global_dtors);
|
||||
}
|
||||
|
||||
exit_states NO_COPY exit_state;
|
||||
|
@ -1003,7 +1003,7 @@ do_exit (int status)
|
|||
|
||||
EnterCriticalSection (&exit_lock);
|
||||
muto::set_exiting_thread ();
|
||||
do_global_dtors ();
|
||||
dll_global_dtors ();
|
||||
|
||||
if (exit_state < ES_EVENTS_TERMINATE)
|
||||
{
|
||||
|
@ -1107,7 +1107,7 @@ cygwin_atexit (void (*function)(void))
|
|||
extern "C" void
|
||||
cygwin_exit (int n)
|
||||
{
|
||||
do_global_dtors ();
|
||||
dll_global_dtors ();
|
||||
if (atexit_lock)
|
||||
atexit_lock.acquire ();
|
||||
exit (n);
|
||||
|
|
Loading…
Reference in New Issue