summaryrefslogtreecommitdiff
path: root/ext/pcntl/pcntl.c
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@zend.com>2019-02-20 22:36:51 +0300
committerDmitry Stogov <dmitry@zend.com>2019-02-20 22:36:51 +0300
commit67682356fba0405b1c75d7ae199f7beda82fbf84 (patch)
treee1a83ab254ccf1f4311b450a30b4b5f0c5f8b707 /ext/pcntl/pcntl.c
parent3d05a6bfea066649a1c9830f3d8bedc56343da50 (diff)
downloadphp-git-67682356fba0405b1c75d7ae199f7beda82fbf84.tar.gz
Reinstall pcntl tick handler on each request (it cleared after the first request).
Diffstat (limited to 'ext/pcntl/pcntl.c')
-rw-r--r--ext/pcntl/pcntl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c
index 14378c6db8..ab7e58685c 100644
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@ -581,6 +581,7 @@ static PHP_GINIT_FUNCTION(pcntl)
PHP_RINIT_FUNCTION(pcntl)
{
+ php_add_tick_function(pcntl_signal_dispatch, NULL);
zend_hash_init(&PCNTL_G(php_signal_table), 16, NULL, ZVAL_PTR_DTOR, 0);
PCNTL_G(head) = PCNTL_G(tail) = PCNTL_G(spares) = NULL;
PCNTL_G(async_signals) = 0;
@@ -591,7 +592,6 @@ PHP_MINIT_FUNCTION(pcntl)
{
php_register_signal_constants(INIT_FUNC_ARGS_PASSTHRU);
php_pcntl_register_errno_constants(INIT_FUNC_ARGS_PASSTHRU);
- php_add_tick_function(pcntl_signal_dispatch, NULL);
orig_interrupt_function = zend_interrupt_function;
zend_interrupt_function = pcntl_interrupt_function;