Commit 92baeddd426 for php.net

commit 92baeddd426e1b9f1a0fd06349245b20c798bf01
Merge: aa44392dfc0 296fad10fb4
Author: David Carlier <devnexen@gmail.com>
Date:   Mon Feb 23 21:26:06 2026 +0000

    Merge branch 'PHP-8.4' into PHP-8.5

    * PHP-8.4:
      ext/pcntl: fix pcntl_signal_dispatch() stale tail pointer and exception handling.

diff --cc ext/pcntl/pcntl.c
index 119de2356f2,082bdc4ba90..4eb58997f4c
--- a/ext/pcntl/pcntl.c
+++ b/ext/pcntl/pcntl.c
@@@ -1420,10 -1377,18 +1424,18 @@@ void pcntl_signal_dispatch(void
  		queue = next;
  	}

+ 	/* drain the remaining in case of exception thrown */
+ 	while (queue) {
+ 		next = queue->next;
+ 		queue->next = PCNTL_G(spares);
+ 		PCNTL_G(spares) = queue;
+ 		queue = next;
+ 	}
+
 -	PCNTL_G(pending_signals) = 0;
 +	PCNTL_G(pending_signals) = false;

  	/* Re-enable queue */
 -	PCNTL_G(processing_signal_queue) = 0;
 +	PCNTL_G(processing_signal_queue) = false;

  	/* Re-enable fiber switching */
  	zend_fiber_switch_unblock();