From: Pierre Joye Date: Tue, 15 Mar 2011 17:13:44 +0000 (+0000) Subject: - make setlocale thread only, drastically reduce TS related crashes in error mgt... X-Git-Tag: php-5.4.0alpha1~191^2~160 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9319359dc9f7808fad0f59970587d0bee5d22643;p=php - make setlocale thread only, drastically reduce TS related crashes in error mgt and other parts like pcre, and actually a good thing (tm) --- diff --git a/main/SAPI.c b/main/SAPI.c index dce548f32e..9a41289a3e 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -80,6 +80,7 @@ SAPI_API void sapi_startup(sapi_module_struct *sf) #ifdef ZTS ts_allocate_id(&sapi_globals_id, sizeof(sapi_globals_struct), (ts_allocate_ctor) sapi_globals_ctor, (ts_allocate_dtor) sapi_globals_dtor); + _configthreadlocale(_ENABLE_PER_THREAD_LOCALE); #else sapi_globals_ctor(&sapi_globals); #endif