Skip to content

Commit eaa457f

Browse files
authored
Merge pull request #585 from nextcloud/fix/generate-all-exec
fix: use PHP_BINARY when executing generate-all workers
2 parents e36b2c3 + 9dfd49c commit eaa457f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

lib/Command/Generate.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int
124124
}
125125

126126
private function executeCoordinator(InputInterface $input) {
127-
128127
$workerCount = (int)$input->getOption(self::OPT_WORKERS);
129128
if ($workerCount <= 0) {
130129
$this->output->writeln("<error>Invalid worker count: $workerCount</error>");
@@ -145,10 +144,9 @@ private function executeCoordinator(InputInterface $input) {
145144
$workerPids[] = $pid;
146145
} else {
147146
// Child
148-
$argv = $_SERVER['argv'];
149147
$env = getenv();
150148
$env[self::ENV_WORKER_CONF] = json_encode($workerconfig, JSON_THROW_ON_ERROR);
151-
pcntl_exec($argv[0], array_slice($argv, 1), $env);
149+
pcntl_exec(PHP_BINARY, $_SERVER['argv'], $env);
152150
}
153151
}
154152

0 commit comments

Comments
 (0)