* 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>
|
2005-05-10 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* cygtls.cc (_cygtls::remove): Clear exitsock after close.
|
* cygtls.cc (_cygtls::remove): Clear exitsock after close.
|
||||||
|
|
|
@ -129,9 +129,8 @@ char *old_title;
|
||||||
char title_buf[TITLESIZE + 1];
|
char title_buf[TITLESIZE + 1];
|
||||||
|
|
||||||
static void
|
static void
|
||||||
do_global_dtors (void)
|
do_global_dtors ()
|
||||||
{
|
{
|
||||||
dll_global_dtors ();
|
|
||||||
void (**pfunc) () = user_data->dtors;
|
void (**pfunc) () = user_data->dtors;
|
||||||
if (pfunc)
|
if (pfunc)
|
||||||
{
|
{
|
||||||
|
@ -982,6 +981,7 @@ extern "C" void
|
||||||
__main (void)
|
__main (void)
|
||||||
{
|
{
|
||||||
do_global_ctors (user_data->ctors, false);
|
do_global_ctors (user_data->ctors, false);
|
||||||
|
atexit (do_global_dtors);
|
||||||
}
|
}
|
||||||
|
|
||||||
exit_states NO_COPY exit_state;
|
exit_states NO_COPY exit_state;
|
||||||
|
@ -1003,7 +1003,7 @@ do_exit (int status)
|
||||||
|
|
||||||
EnterCriticalSection (&exit_lock);
|
EnterCriticalSection (&exit_lock);
|
||||||
muto::set_exiting_thread ();
|
muto::set_exiting_thread ();
|
||||||
do_global_dtors ();
|
dll_global_dtors ();
|
||||||
|
|
||||||
if (exit_state < ES_EVENTS_TERMINATE)
|
if (exit_state < ES_EVENTS_TERMINATE)
|
||||||
{
|
{
|
||||||
|
@ -1107,7 +1107,7 @@ cygwin_atexit (void (*function)(void))
|
||||||
extern "C" void
|
extern "C" void
|
||||||
cygwin_exit (int n)
|
cygwin_exit (int n)
|
||||||
{
|
{
|
||||||
do_global_dtors ();
|
dll_global_dtors ();
|
||||||
if (atexit_lock)
|
if (atexit_lock)
|
||||||
atexit_lock.acquire ();
|
atexit_lock.acquire ();
|
||||||
exit (n);
|
exit (n);
|
||||||
|
|
Loading…
Reference in New Issue