|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #71437 pcntl_signal(SIGCHLD, SIG_IGN); dont work property
Submitted: 2016-01-23 23:15 UTC Modified: -
From: bupycnet at gmail dot com Assigned:
Status: Open Package: PCNTL related
PHP Version: 7.0.3RC1 OS: ArchLinux
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: bupycnet at gmail dot com
New email:
PHP Version: OS:


 [2016-01-23 23:15 UTC] bupycnet at gmail dot com
1. If i use it - sleep function dont work.
2. It if use it in class - its not work.

Test script:
		declare(ticks = 1);
		pcntl_signal(SIGCHLD, SIG_IGN);
				$pid = pcntl_fork();
					if ($pid == -1) {
					     die('could not fork');
					} else if ($pid) {
					} else {
					     	echo 'Child'.$i."\r\n";

		echo 'Test123';
		echo 'Test456';

Expected result:
This script work withouts sleep

Actual result:
Sleep need work.


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2016-07-15 23:15 UTC] dave at mudsite dot com
I'm not quite sure which sleep you're talking about that needs to exist, however, your test script doesn't seem to have any problems to me.  If you're using the sleep(60) to ensure that all children finish, you should be using pcntl_wait(), which will block until all children finish.
 [2016-12-25 20:50 UTC] dave at mudsite dot com
For what it's worth this could be related to Bug #73783 if you had compiled 7.0.3RC1 with zend-signals.  The problem with zend-signals does exist in v7.0.* but since it's an option you'd need to enable at configure time, it's less likely to have shown up.
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Oct 25 10:01:24 2020 UTC