]> 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:03 +0000 (16:46 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 22 Dec 2005 16:46:03 +0000 (16:46 +0000)
Zend/zend_execute_API.c

index 5b369f7efdb2a7082331cade8326dc5752b2a3e0..e009c3a13502e94820ef1a825acea7228a56c895 100644 (file)
@@ -1342,6 +1342,7 @@ static unsigned __stdcall timeout_thread_proc(void *pArgs)
        }
        DestroyWindow(timeout_window);
        UnregisterClass(wc.lpszClassName, NULL);
+       SetEvent(timeout_thread_handle);
        return 0;
 }
 
@@ -1349,7 +1350,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);
 }