From 640376de00f57c4ae09ef4b8518086e97b304cb4 Mon Sep 17 00:00:00 2001 From: Arnaud Le Blanc Date: Fri, 27 Jun 2025 14:02:36 +0200 Subject: [PATCH] Fix pcntl_rfork / pcntl_forkx with zend-max-execution-timers --- ext/pcntl/pcntl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index adb94af2fb463..16f29d419e3da 100644 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -1277,6 +1277,8 @@ PHP_FUNCTION(pcntl_rfork) default: php_error_docref(NULL, E_WARNING, "Error %d", errno); } + } else if (pid == 0) { + zend_max_execution_timer_init(); } RETURN_LONG((zend_long) pid); @@ -1320,6 +1322,8 @@ PHP_FUNCTION(pcntl_forkx) default: php_error_docref(NULL, E_WARNING, "Error %d", errno); } + } else if (pid == 0) { + zend_max_execution_timer_init(); } RETURN_LONG((zend_long) pid);