#!/usr/bin/env php
<?php
/**
- * @copyright Copyright (C) 2020, Friendica
+ * @copyright Copyright (C) 2010-2021, the Friendica project
*
* @license GNU AGPL version 3 or any later version
*
usleep($sleep);
$pid = pcntl_waitpid(-1, $status, WNOHANG);
- Logger::info('Checked children status via pcntl_waitpid', ['pid' => $pid, 'status' => $status]);
-
+ if ($pid > 0) {
+ Logger::info('Children quit via pcntl_waitpid', ['pid' => $pid, 'status' => $status]);
+ }
+
$timeout = ($seconds >= $wait_interval);
} while (!$timeout && !Worker::IPCJobsExists());