diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-11 15:05:01 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-11 15:05:01 +0200 |
commit | 5d93eab6207614d44378f0034656cf382963244b (patch) | |
tree | 9603cb5d848d95541bfbae057b9a8807810b0f15 /Zend/zend_execute_API.c | |
parent | 091d53c1310c78a47edcc7eaef5b7b005b3856ab (diff) | |
download | php-git-5d93eab6207614d44378f0034656cf382963244b.tar.gz |
Don't reset SIGG(running) when calling zend_on_timeout
This is only an internal callback nowadays and does not actually
run any user code. It must be async signal safe.
Diffstat (limited to 'Zend/zend_execute_API.c')
-rw-r--r-- | Zend/zend_execute_API.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/Zend/zend_execute_API.c b/Zend/zend_execute_API.c index d98db72fba..bbd7bb8f8b 100644 --- a/Zend/zend_execute_API.c +++ b/Zend/zend_execute_API.c @@ -1164,15 +1164,6 @@ static void zend_timeout_handler(int dummy) /* {{{ */ #endif if (zend_on_timeout) { -#ifdef ZEND_SIGNALS - /* - 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; -#endif zend_on_timeout(EG(timeout_seconds)); } @@ -1216,13 +1207,13 @@ static void zend_set_timeout_ex(zend_long seconds, int reset_signals) /* {{{ */ #ifdef ZEND_WIN32 zend_executor_globals *eg; - if(!seconds) { + if (!seconds) { return; } - /* Don't use ChangeTimerQueueTimer() as it will not restart an expired - timer, so we could end up with just an ignored timeout. Instead - delete and recreate. */ + /* Don't use ChangeTimerQueueTimer() as it will not restart an expired + * timer, so we could end up with just an ignored timeout. Instead + * delete and recreate. */ if (NULL != tq_timer) { if (!DeleteTimerQueueTimer(NULL, tq_timer, INVALID_HANDLE_VALUE)) { tq_timer = NULL; |