|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2016-04-08 12:59 UTC] ivan dot shib at gmail dot com
Description:
------------
In the php code run the following command:
exec('php -f '.escapeshellarg(ROOT_DIR.'/index.php').' > /dev/null 2>&1 &');
Got the following record in the logs:
2016-04-08T12:55:38.201816261Z [08-Apr-2016 12:55:38] ALERT: oops, unknown child (16) exited with code 0. Please open a bug report (https://bugs.php.net).
If we remove ' > /dev/null 2>&1 &' part from code then it works fine but not asynchronously.
Please note that in PHP v 7.0.3 the code above worked fine.
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Oct 25 17:00:01 2025 UTC |
This is not an error. You are a creating a child process inside the shell without correctly handling it using waitpid. Therefore the FPM module finds an unknown child and writes this warning. The correct way to do this is using something along the line of: $p = pcntl_fork(); if ($p == 0) { // child process exec('php -f index.php'); } else if ($p > 0) { // parent waitpid($p, $status); } else { // error }