Bug #75081 [NEW]: pending signals limit
From: konrad dot baumgart at moneyhouse dot de
Operating system: Ubuntu 16.04
PHP version: 7.1.8
Package: PCNTL related
Bug Type: Bug
Bug description:pending signals limit
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
--
Edit bug report at https://bugs.php.net/bug.php?id=75081&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75081&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75081&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75081&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=75081&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=75081&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=75081&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=75081&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=75081&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=75081&r=support
Expected behavior: https://bugs.php.net/fix.php?id=75081&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=75081&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=75081&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=75081&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75081&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=75081&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=75081&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=75081&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=75081&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=75081&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=75081&r=mysqlcfg
Thread (1 message)
- konrad dot baumgart at moneyhouse dot de