]> granicus.if.org Git - php/commitdiff
Reinstall pcntl tick handler on each request (it cleared after the first request).
authorDmitry Stogov <dmitry@zend.com>
Wed, 20 Feb 2019 19:36:51 +0000 (22:36 +0300)
committerDmitry Stogov <dmitry@zend.com>
Wed, 20 Feb 2019 19:36:51 +0000 (22:36 +0300)
ext/pcntl/pcntl.c

index 14378c6db8b26ab0cce0afd711f42b6906db41e1..ab7e58685cbe238fed3ec37d58f855db9bc24697 100644 (file)
@@ -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;