Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2005-05-10 20:08:46 +0400
committerChristopher Faylor <me@cgf.cx>2005-05-10 20:08:46 +0400
commita586e5b6ae64fc46496249b2fd35bec613e3a724 (patch)
tree2b934064d2679739dd103a59edfbffd31f2fe7a5
parentd699bc988f9be793e28f3c9a1053a2f09cf2e135 (diff)
* dcrt0.cc (dll_crt0_1): Call cygwin_exit to ensure that destructors are
handled correctly.
-rw-r--r--winsup/cygwin/ChangeLog5
-rw-r--r--winsup/cygwin/dcrt0.cc4
2 files changed, 8 insertions, 1 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog
index 7fead992c..16d3e876f 100644
--- a/winsup/cygwin/ChangeLog
+++ b/winsup/cygwin/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-10 Christopher Faylor <cgf@timesys.com>
+
+ * dcrt0.cc (dll_crt0_1): Call cygwin_exit to ensure that destructors
+ are handled correctly.
+
2005-05-10 Corinna Vinschen <corinna@vinschen.de>
* path.cc (path_conv::check): Set correct file attributes for socket
diff --git a/winsup/cygwin/dcrt0.cc b/winsup/cygwin/dcrt0.cc
index a2e458f89..a29722968 100644
--- a/winsup/cygwin/dcrt0.cc
+++ b/winsup/cygwin/dcrt0.cc
@@ -41,6 +41,8 @@ details. */
#define PREMAIN_LEN (sizeof (user_data->premain) / sizeof (user_data->premain[0]))
+extern "C" void cygwin_exit (int);
+
void ld_preload ();
HANDLE NO_COPY hMainProc = (HANDLE) -1;
@@ -885,7 +887,7 @@ dll_crt0_1 (char *)
wait_for_sigthread ();
ld_preload ();
if (user_data->main)
- exit (user_data->main (__argc, __argv, *user_data->envptr));
+ cygwin_exit (user_data->main (__argc, __argv, *user_data->envptr));
}
struct _reent *