|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-12-19 10:25 UTC] zorg at razza dot org
Description:
------------
The use of pcntl_signal(SIGCHLD, SIG_IGN) breaks sleep(). In 7.0 the below script would sleep for 60 seconds then exit, in 7.1 the script does not sleep at all.
Test script:
---------------
pcntl_signal(SIGCHLD, SIG_IGN);
sleep(60);
exit('Done');
Expected result:
----------------
Sleep for 60 seconds, print 'Done' and exit.
Actual result:
--------------
Instantly prints 'Done' and exist.
PatchesPull Requests
Pull requests:
HistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
Sorry, the test script is incorrect. It should be: pcntl_signal(SIGCHLD, SIG_IGN); $pid = @pcntl_fork(); if ($pid == -1) { exit(pcntl_get_last_error() . ': ' . pcntl_strerror(pcntl_get_last_error())); } elseif ($pid == 0) { exit(); } sleep(60); exit("Done"); This also creates a <defunct> process when pcntl_signal(SIGCHLD, SIG_IGN) should have removed it.