From c23bb9ce4ff7499b4af38738c10877741a990e84 Mon Sep 17 00:00:00 2001 From: Harald Radi Date: Wed, 29 Jan 2003 00:46:31 +0000 Subject: [PATCH] ilia pointet me to a thread on php-dev saying that Co(Un)Initialize should be called per thread --- main/main.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/main/main.c b/main/main.c index a5415425d8..d4a58e1346 100644 --- a/main/main.c +++ b/main/main.c @@ -841,6 +841,10 @@ int php_request_startup(TSRMLS_D) { int retval = SUCCESS; +#ifdef PHP_WIN32 + CoInitialize(NULL); +#endif + #if PHP_SIGCHILD signal(SIGCHLD, sigchld_handler); #endif @@ -952,6 +956,10 @@ void php_request_shutdown(void *dummy) zend_try { zend_unset_timeout(TSRMLS_C); } zend_end_try(); + +#ifdef PHP_WIN32 + CoUninitialize(); +#endif } /* }}} */ @@ -1015,8 +1023,6 @@ int php_module_startup(sapi_module_struct *sf, zend_module_entry *additional_mod WSADATA wsaData; #endif #ifdef PHP_WIN32 - CoInitialize(NULL); - { DWORD dwVersion = GetVersion(); @@ -1236,10 +1242,6 @@ void php_module_shutdown(TSRMLS_D) #endif module_initialized = 0; - -#ifdef PHP_WIN32 - CoUninitialize(); -#endif } /* }}} */ -- 2.40.0