php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #52992 No SIGCHLD signal received
Submitted: 2010-10-05 14:55 UTC Modified: -
Votes:6
Avg. Score:4.3 ± 0.9
Reproduced:3 of 3 (100.0%)
Same Version:1 (33.3%)
Same OS:1 (33.3%)
From: dverspui at hotpop dot com Assigned:
Status: Open Package: PCNTL related
PHP Version: 5.3.3 OS: CentOS 5.5
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
MUST BE VALID
Solve the problem:
21 + 1 = ?
Subscribe to this entry?

 
 [2010-10-05 14:55 UTC] dverspui at hotpop dot com
Description:
------------
The included CLI test script forks a child process and should terminate when the child process finishes after two seconds with the message that SIGCHLD signal (17) was received. This works as expected on my Fedora system with PHP 5.3.3-1 installed, but the process never receives SIGCHLD on my CentOS system with identically built PHP 5.3.3-1.

The configure line for the CentOS system is the one below, the Fedora one is the same except for some differences in paths but not options:
'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/usr/com' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--with-t1lib=/usr' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--with-libxml-dir=/usr' '--enable-xml' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem'  

I rebuilt the CentOS PHP with explicit option --disable-sigchld but that didn't help, it is the default after all.

Test script:
---------------
<?php
if (($pid = pcntl_fork()) === 0)
  usleep(2000000);
else if ($pid !== -1)
{
  $signals = array(SIGINT, SIGCHLD);
  pcntl_sigprocmask(SIG_BLOCK, $signals, $prevSignals);
  $signal = pcntl_sigwaitinfo($signals, $info);
  echo "received signal ${signal}\n";
}


Expected result:
----------------
> php test.php
received signal 17

Actual result:
--------------
> php test.php
process runs forever until SIGINT is received (CTRL+C), the child process is defunct after two seconds

Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Tue Dec 10 02:01:24 2019 UTC