summaryrefslogtreecommitdiff
path: root/Zend/zend_execute_API.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2008-03-19 15:30:49 +0000
committerRasmus Lerdorf <rasmus@php.net>2008-03-19 15:30:49 +0000
commitea790cef01b6551db288935eae08802bc9bdb831 (patch)
tree548f6ff18dd13025821dc348a1a3e6124b2629b5 /Zend/zend_execute_API.c
parentd2f23dbe64d92483d5891c050aeadda3a0e58ec2 (diff)
downloadphp-git-ea790cef01b6551db288935eae08802bc9bdb831.tar.gz
On Windows I guess there is no point starting the timeout thread until
we actually have a timeout value.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r--Zend/zend_execute_API.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c
index 2b939e4147..0666762b3b 100644
--- a/Zend/zend_execute_API.c
+++ b/Zend/zend_execute_API.c
@@ -1534,13 +1534,16 @@ void zend_set_timeout(long seconds, int reset_signals) /* {{{ */
EG(timeout_seconds) = seconds;
#ifdef ZEND_WIN32
+ if(!seconds) {
+ return;
+ }
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
* is initialized inside a DllMain(), you're not supposed to start threads from it.
*/
zend_init_timeout_thread();
}
- if(seconds) PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
+ PostThreadMessage(timeout_thread_id, WM_REGISTER_ZEND_TIMEOUT, (WPARAM) GetCurrentThreadId(), (LPARAM) seconds);
#else
# ifdef HAVE_SETITIMER
{