@@ -134,6 +134,7 @@ const zend_function_entry pcntl_functions[] = {
134
134
PHP_FE (pcntl_waitpid , arginfo_pcntl_waitpid )
135
135
PHP_FE (pcntl_wait , arginfo_pcntl_wait )
136
136
PHP_FE (pcntl_signal , arginfo_pcntl_signal )
137
+ PHP_FE (pcntl_signal_dispatch , arginfo_pcntl_void )
137
138
PHP_FE (pcntl_wifexited , arginfo_pcntl_wifexited )
138
139
PHP_FE (pcntl_wifstopped , arginfo_pcntl_wifstopped )
139
140
PHP_FE (pcntl_wifsignaled , arginfo_pcntl_wifsignaled )
@@ -173,7 +174,7 @@ ZEND_GET_MODULE(pcntl)
173
174
#endif
174
175
175
176
static void pcntl_signal_handler (int );
176
- static void pcntl_tick_handler ();
177
+ static void pcntl_signal_dispatch ();
177
178
178
179
void php_register_signal_constants (INIT_FUNC_ARGS )
179
180
{
@@ -262,7 +263,7 @@ PHP_RINIT_FUNCTION(pcntl)
262
263
PHP_MINIT_FUNCTION (pcntl )
263
264
{
264
265
php_register_signal_constants (INIT_FUNC_ARGS_PASSTHRU );
265
- php_add_tick_function (pcntl_tick_handler );
266
+ php_add_tick_function (pcntl_signal_dispatch );
266
267
267
268
return SUCCESS ;
268
269
}
@@ -644,6 +645,15 @@ PHP_FUNCTION(pcntl_signal)
644
645
}
645
646
/* }}} */
646
647
648
+ /* {{{ proto bool pcntl_signal_dispatch()
649
+ Dispatch signals to signal handlers */
650
+ PHP_FUNCTION (pcntl_signal_dispatch )
651
+ {
652
+ pcntl_signal_dispatch ();
653
+ RETURN_TRUE ;
654
+ }
655
+ /* }}} */
656
+
647
657
#ifdef HAVE_GETPRIORITY
648
658
/* {{{ proto int pcntl_getpriority([int pid [, int process_identifier]])
649
659
Get the priority of any process */
@@ -747,7 +757,7 @@ static void pcntl_signal_handler(int signo)
747
757
PCNTL_G (tail ) = psig ;
748
758
}
749
759
750
- void pcntl_tick_handler ()
760
+ void pcntl_signal_dispatch ()
751
761
{
752
762
zval * param , * * handle , * retval ;
753
763
struct php_pcntl_pending_signal * queue , * next ;
0 commit comments