|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #75081 pending signals limit
Submitted: 2017-08-17 07:02 UTC Modified: -
Avg. Score:3.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: konrad dot baumgart at moneyhouse dot de Assigned:
Status: Open Package: PCNTL related
PHP Version: 7.1.8 OS: Ubuntu 16.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: konrad dot baumgart at moneyhouse dot de
New email:
PHP Version: OS:


 [2017-08-17 07:02 UTC] konrad dot baumgart at moneyhouse dot de
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:
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());

Expected result:
'SIGALED' is outputted

Actual result:
nothing is outputted


Add a Patch

Pull Requests

Add a Pull Request

PHP Copyright © 2001-2018 The PHP Group
All rights reserved.
Last updated: Sun Nov 19 01:31:42 2017 UTC