cvs: ZendEngine2 / zend_execute_API.c

From: Date: Fri, 09 Dec 2005 18:09:08 +0000
Subject: cvs: ZendEngine2 / zend_execute_API.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-4439@lists.php.net to get a copy of this message
dmitry Fri Dec 9 13:09:08 2005 EDT Modified files: /ZendEngine2 zend_execute_API.c Log: Fixed bug #35612 (iis6 Access Violation crash) http://cvs.php.net/diff.php/ZendEngine2/zend_execute_API.c?r1=1.345&r2=1.346&ty=u Index: ZendEngine2/zend_execute_API.c diff -u ZendEngine2/zend_execute_API.c:1.345 ZendEngine2/zend_execute_API.c:1.346 --- ZendEngine2/zend_execute_API.c:1.345 Mon Dec 5 03:56:31 2005 +++ ZendEngine2/zend_execute_API.c Fri Dec 9 13:09:08 2005 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute_API.c,v 1.345 2005/12/05 08:56:31 dmitry Exp $ */ +/* $Id: zend_execute_API.c,v 1.346 2005/12/09 18:09:08 dmitry Exp $ */ #include <stdio.h> #include <signal.h> @@ -46,6 +46,7 @@ static WNDCLASS wc; static HWND timeout_window; static HANDLE timeout_thread_event; +static HANDLE timeout_thread_handle; static DWORD timeout_thread_id; static int timeout_thread_initialized=0; #endif @@ -1346,7 +1347,7 @@ void zend_init_timeout_thread() { timeout_thread_event = CreateEvent(NULL, FALSE, FALSE, NULL); - _beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id); + timeout_thread_handle = _beginthreadex(NULL, 0, timeout_thread_proc, NULL, 0, &timeout_thread_id); WaitForSingleObject(timeout_thread_event, INFINITE); } @@ -1357,6 +1358,10 @@ return; } PostThreadMessage(timeout_thread_id, WM_QUIT, 0, 0); + + /* Wait for thread termination */ + WaitForSingleObject(timeout_thread_handle, 5000); + CloseHandle(timeout_thread_handle); } #endif

« previous php.zend-engine.cvs (#4439) next »