]> granicus.if.org Git - php/commitdiff
Fixed bug #35612 (iis6 Access Violation crash). (alacn dot uhahaa at gmail dot com)
authorDmitry Stogov <dmitry@php.net>
Thu, 22 Dec 2005 16:46:15 +0000 (16:46 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 22 Dec 2005 16:46:15 +0000 (16:46 +0000)
Zend/zend_execute_API.c

index 76246434123cd08328823459b4aad1755e3fa74f..f10eb29941cfe36598bfba0eacd90c13e0ac4220 100644 (file)
@@ -1284,6 +1284,7 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
        }
        DestroyWindow(timeout_window);
        UnregisterClass(wc.lpszClassName, NULL);
+       SetEvent(timeout_thread_handle);
        return 0;
 }
 
@@ -1291,7 +1292,8 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
 void zend_init_timeout_thread()
 {
        timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL);
-       timeout_thread_handle = _beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
+       timeout_thread_handle = CreateEvent(NULL, FALSE, FALSE, NULL);
+       _beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id);
        WaitForSingleObject(timeout_thread_event, INFINITE);
 }