From: Dmitry Stogov Date: Thu, 5 Nov 2009 09:33:19 +0000 (+0000) Subject: Fixed unnecessary invokation of setitimer when timeouts have been disabled (Arvind... X-Git-Tag: php-5.2.12RC1~18 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1e52beff0f429e641136d45503049c034195ecfe;p=php Fixed unnecessary invokation of setitimer when timeouts have been disabled (Arvind Srinivasan) --- diff --git a/NEWS b/NEWS index 427f4603c7..f9edc5c4d4 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,8 @@ PHP NEWS number of file uploads per-request to 100 by default, to prevent possible DOS via temporary file exhaustion. (Ilia) +- Fixed unnecessary invokation of setitimer when timeouts have been disabled + (Arvind Srinivasan) - Fixed crash in com_print_typeinfo when an invalid typelib is given. (Pierre) - Fixed a safe_mode bypass in tempnam() identified by Grzegorz Stachowiak. diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index f2655729b2..f402017f99 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1511,7 +1511,7 @@ void zend_unset_timeout(TSRMLS_D) } #else # ifdef HAVE_SETITIMER - { + if (EG(timeout_seconds)) { struct itimerval no_timeout; no_timeout.it_value.tv_sec = no_timeout.it_value.tv_usec = no_timeout.it_interval.tv_sec = no_timeout.it_interval.tv_usec = 0;