Check for childf status

This commit is contained in:
Michael 2021-01-03 22:57:25 +00:00
parent d70d180e4b
commit 74d7d7e164
2 changed files with 21 additions and 9 deletions

View file

@ -223,6 +223,9 @@ while (true) {
$sleep = min(1000000, round(log10($arg) * 1000000, 0));
usleep($sleep);
$pid = pcntl_waitpid(-1, $status, WNOHANG);
Logger::info('Checked children status via pcntl_waitpid', ['pid' => $pid, 'status' => $status]);
$timeout = ($seconds >= $wait_interval);
} while (!$timeout && !Worker::IPCJobsExists());