1
0
Fork 0

Merge pull request #5481 from annando/issue-5467

Issue 5467: Fix worker and daemon
This commit is contained in:
Tobias Diekershoff 2018-07-24 06:27:05 +02:00 committed by GitHub
commit f2b97f9320
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 9 deletions

View file

@ -13,9 +13,8 @@ use Friendica\Core\Worker;
use Friendica\Database\DBA;
// Get options
$shortopts = '';
$shortopts .= 'f';
$longopts = [ 'foreground' ];
$shortopts = 'f';
$longopts = ['foreground'];
$options = getopt($shortopts, $longopts);
// Ensure that daemon.php is executed from the base path of the installation

View file

@ -11,9 +11,8 @@ use Friendica\Core\Config;
use Friendica\Core\Worker;
// Get options
$shortopts = '';
$shortopts .= 'sc';
$longopts = [ 'spawn', 'cron' ];
$shortopts = 'sc';
$longopts = ['spawn', 'cron'];
$options = getopt($shortopts, $longopts);
// Ensure that worker.php is executed from the base path of the installation

View file

@ -1127,7 +1127,7 @@ class App
return;
}
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . $command;
$cmdline = $this->getConfigValue('config', 'php_path', 'php') . ' ' . escapeshellarg($command);
foreach ($args as $key => $value) {
if (!is_null($value) && is_bool($value) && !$value) {
@ -1140,8 +1140,6 @@ class App
}
}
$cmdline = escapeshellarg($cmdline);
if ($this->min_memory_reached()) {
return;
}