cvs: ZendEngine2 / zend_execute_API.c
| From: | Dmitry Stogov | Date: | Fri, 10 Nov 2006 11:51:55 +0000 |
| Subject: | cvs: ZendEngine2 / zend_execute_API.c | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-5380@lists.php.net to get a copy of this message | ||
dmitry Fri Nov 10 11:51:55 2006 UTC
Modified files:
/ZendEngine2 zend_execute_API.c
Log:
Start timiout thread on Windows only if necessary
http://cvs.php.net/viewvc.cgi/ZendEngine2/zend_execute_API.c?r1=1.387&r2=1.388&diff_format=u
Index: ZendEngine2/zend_execute_API.c
diff -u ZendEngine2/zend_execute_API.c:1.387 ZendEngine2/zend_execute_API.c:1.388
--- ZendEngine2/zend_execute_API.c:1.387 Wed Nov 8 10:09:17 2006
+++ ZendEngine2/zend_execute_API.c Fri Nov 10 11:51:55 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_execute_API.c,v 1.387 2006/11/08 10:09:17 pollita Exp $ */
+/* $Id: zend_execute_API.c,v 1.388 2006/11/10 11:51:55 dmitry Exp $ */
#include <stdio.h>
#include <signal.h>
@@ -1521,6 +1521,9 @@
TSRMLS_FETCH();
EG(timeout_seconds) = seconds;
+ if(!seconds) {
+ return;
+ }
#ifdef ZEND_WIN32
if (timeout_thread_initialized==0 &&
InterlockedIncrement(&timeout_thread_initialized)==1) {
/* We start up this process-wide thread here and not in zend_startup(), because if Zend
@@ -1559,7 +1562,9 @@
void zend_unset_timeout(TSRMLS_D)
{
#ifdef ZEND_WIN32
- PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(),
(LPARAM) 0);
+ if(timeout_thread_initialized) {
+ PostThreadMessage(timeout_thread_id, WM_UNREGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(),
(LPARAM) 0);
+ }
#else
# ifdef HAVE_SETITIMER
{