From ca2234d18c89f7e631420e60448d56fa1dec2d9a Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Wed, 7 Sep 2011 18:48:17 +0000 Subject: [PATCH] Make timeouts work again for shutdown functions. Fixes the faling lang/045 test --- Zend/zend_execute_API.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index 839621ea6b..2572f85b90 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1328,6 +1328,13 @@ ZEND_API void zend_timeout(int dummy) /* {{{ */ TSRMLS_FETCH(); if (zend_on_timeout) { + /* + We got here because we got a timeout signal, so we are in a signal handler + at this point. However, we want to be able to timeout any user-supplied + shutdown functions, so pretend we are not in a signal handler while we are + calling these + */ + SIGG(running) = 0; zend_on_timeout(EG(timeout_seconds) TSRMLS_CC); } -- 2.50.1