|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull Requests |
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 23:00:02 2025 UTC |
Description: ------------ It seems php 'remembers' only first 32 signals that it receives between calls to pcntl_signal_dispatch() (or ticks). There should be infinite queue of pending signals (or very large like 2^16 entries, or at least have current behavior described in documentation). Current behavior is non intuitive, I tested similar C application: - i suspended it - i sent it many signals - i woke it up - it received 1 signal of each kind Test script: --------------- <?php pcntl_signal(SIGTERM, function () { echo 'SIGALED' . PHP_EOL; }); pcntl_signal(SIGCONT, function () { }); for ($j = 0; $j < 32 /* works for 31*/; $j++) { exec('kill -' . SIGCONT . ' ' . posix_getpid()); } exec('kill ' . posix_getpid()); pcntl_signal_dispatch(); Expected result: ---------------- 'SIGALED' is outputted Actual result: -------------- nothing is outputted