summaryrefslogtreecommitdiffstats
path: root/winsup/cygwin/init.cc
diff options
context:
space:
mode:
authorChristopher Faylor <me@cgf.cx>2011-11-26 19:20:13 +0000
committerChristopher Faylor <me@cgf.cx>2011-11-26 19:20:13 +0000
commitd8e7e40416df0118c66e0ec434d8beb1c628131c (patch)
treef7e573fc97eeed9187af6f950d70d4b8be0b9921 /winsup/cygwin/init.cc
parent4ab568c60c33a8e0a74a9aa58bcaf15811ba860b (diff)
downloadcygnal-d8e7e40416df0118c66e0ec434d8beb1c628131c.tar.gz
cygnal-d8e7e40416df0118c66e0ec434d8beb1c628131c.tar.bz2
cygnal-d8e7e40416df0118c66e0ec434d8beb1c628131c.zip
* init.cc (remove): Don't bother calling through thread removal cleanup if we
are exiting.
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r--winsup/cygwin/init.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 107d037f9..480a41ea3 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -150,6 +150,7 @@ dll_entry (HANDLE h, DWORD reason, void *static_load)
break;
case DLL_THREAD_DETACH:
if (dll_finished_loading
+ && exit_state < ES_FINAL
&& (PVOID) &_my_tls > (PVOID) &wow64_test_stack_marker
&& _my_tls.isinitialized ())
_my_tls.remove (0);