summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--winsup/cygwin/ChangeLog8
-rw-r--r--winsup/cygwin/dcrt0.cc8
2 files changed, 12 insertions, 4 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 377747ee5..6419c9084 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -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.
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index a29722968..f211e4578 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -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);