Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c

From: Date: Wed, 07 Sep 2011 20:17:31 +0000
Subject: Re: Re: svn: /php/php-src/ branches/PHP_5_4/Zend/zend_execute_API.c trunk/Zend/zend_execute_API.c
References: 1 2 3 4 5 6 7  Groups: php.internals 
Request: Send a blank email to internals+get-55288@lists.php.net to get a copy of this message
On 09/07/2011 01:04 PM, Stas Malyshev wrote: > Hi! > > On 9/7/11 12:43 PM, Rasmus Lerdorf wrote: >> Actually, it seems to be more than that. That set_time_limit() just >> speeds up the test. Since we have a default max_execution_time you >> should still have hit that and the shutdown function should have been >> called. But your other max_execution_time-related tests, like 045 pass, >> so what is special about this one? The tight for(;;) loop? > > setitimer exists just fine on Darwin, but the tight loop seems to be the > problem - if I put echo time(); in the loop, it exits in prescribed > time. Without it, it runs forever. Actually, just time() without echo > seems to be enough - looks like any system calls make it work, but tight > loop doesn't. Interesting that this is different on Darwin. That doesn't seem like something that should be OS-specific unless Darwin's itimer implementation is messed up. On Linux the SIGPROF itimer is documented like this: ITIMER_PROF decrements both when the process executes and when the system is executing on behalf of the process. Coupled with ITIMER_VIRTUAL, this timer is usually used to profile the time spent by the application in user and kernel space. SIGPROF is delivered upon expiration. There is nothing about a tight PHP loop that should cause an itimer like that to not decrement and send a SIGPROF when it expires.

« previous php.internals (#55288) next »