X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=bin%2Fdaemon.php;h=7d4945fe0378771ce1e04406f5d2f6e78d1e3bfb;hb=c0db96e84f51639cd2d8bdc1fbe5f67c413a5f7c;hp=cc86a9f20155500817cf9622571c72babb8bf398;hpb=74d7d7e164364c09b7fdfbf64e15168ccd56508a;p=friendica.git diff --git a/bin/daemon.php b/bin/daemon.php index cc86a9f201..7d4945fe03 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -1,7 +1,7 @@ #!/usr/bin/env php addRules(include __DIR__ . '/../static/dependencies.config $dice = $dice->addRule(LoggerInterface::class,['constructParams' => ['daemon']]); DI::init($dice); +\Friendica\Core\Logger\Handler\ErrorHandler::register($dice->create(\Psr\Log\LoggerInterface::class)); $a = DI::app(); if (DI::mode()->isInstall()) { @@ -224,8 +225,10 @@ while (true) { 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());