Antony Dovgal wrote:
On 03/19/2008 12:42 AM, Rasmus Lerdorf wrote:
rasmus          Tue Mar 18 21:42:51 2008 UTC

  Modified files:              (Branch: PHP_5_3)
/ZendEngine2 zend_execute.h zend_execute_API.c /php-src/main SAPI.c SAPI.h main.c php_globals.h /php-src/sapi/apache mod_php5.c Log:
  exit_on_timeout patch

Is tests/func/005a.phpt supposed to fail after your patch?

Because that's what I see:
./sapi/cli/php tests/func/005a.php
Profiling timer expired

Ah, I see the problem.

The main thing I fixed here was to only set the signal handlers on startup. This gives us two benefits. First, it allows us to at some point come up with a signal deferral mechanism that can catch all catchable signals and redeliver them after a critical section, and second, it speeds things up a bit. Resetting SIGPROF to zend_timeout all the time doesn't make much sense.

The reason why this test is failing is that it isn't getting the signal handler set to begin with because for cli max_execution_time defaults to 0 and zend_set_timeout does a:

        if(!seconds) {

before it sets the signal handler. So the fix is trivial. I just need to hook up SIGPROF/SIGALRM to zend_timeout regardless of the timeout value in case there is an in-request call to set_time_limit.

I'll get that patch in after breakfast.


PHP CVS Mailing List (
To unsubscribe, visit:

Reply via email to