PHPAPI int core_globals_id;
#endif
+/* temporary workaround for thread-safety issues in libzend */
+#if defined(ZTS) && !defined(NO_GLOBAL_LOCK)
+static THREAD_T global_lock;
+#define global_lock() tsrm_mutex_lock(global_lock)
+#define global_unlock() tsrm_mutex_unlock(global_lock);
+#define global_lock_init() global_lock = tsrm_mutex_alloc()
+#define global_lock_destroy() tsrm_mutex_free(global_lock)
+#else
+#define global_lock()
+#define global_unlock()
+#define global_lock_init()
+#define global_lock_destroy()
+#endif
+
+
void _php3_build_argv(char * ELS_DC);
static void php3_timeout(int dummy);
static void php3_set_timeout(long seconds);
int php_request_startup(CLS_D ELS_DC PLS_DC SLS_DC)
{
+ global_lock();
+
php_output_startup();
if (PG(output_buffering)) {
request_info.php_argv0 = NULL;
}
#endif
+
+ global_unlock();
}
WSADATA wsaData;
#endif
+ global_lock_init();
SG(server_context) = NULL;
SG(request_info).request_method = NULL;
sapi_activate(SLS_C);
sapi_rqst->flush(sapi_rqst->scid);
#endif
+ global_lock_destroy();
zend_shutdown();
UNREGISTER_INI_ENTRIES();
php_ini_mshutdown();