aboutsummaryrefslogtreecommitdiff
path: root/winsup/cygwin/init.cc
diff options
context:
space:
mode:
Diffstat (limited to 'winsup/cygwin/init.cc')
-rw-r--r--winsup/cygwin/init.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/winsup/cygwin/init.cc b/winsup/cygwin/init.cc
index 2df5067..0e660ac 100644
--- a/winsup/cygwin/init.cc
+++ b/winsup/cygwin/init.cc
@@ -26,6 +26,12 @@ WINAPI dll_entry (HANDLE h, DWORD reason, void *static_load)
dynamically_loaded = (static_load == NULL);
break;
case DLL_THREAD_ATTACH:
+ if (user_data->initial_sp)
+ {
+ if ( !TlsSetValue(user_data->threadinterface->reent_index,
+ &user_data->threadinterface->reents))
+ api_fatal("Sig proc MT init failed\n");
+ }
break;
case DLL_PROCESS_DETACH:
break;