diff --git a/lib/Command/Generate.php b/lib/Command/Generate.php index 9b99d7a..2626644 100644 --- a/lib/Command/Generate.php +++ b/lib/Command/Generate.php @@ -124,7 +124,6 @@ protected function execute(InputInterface $input, OutputInterface $output): int } private function executeCoordinator(InputInterface $input) { - $workerCount = (int)$input->getOption(self::OPT_WORKERS); if ($workerCount <= 0) { $this->output->writeln("Invalid worker count: $workerCount"); @@ -145,10 +144,9 @@ private function executeCoordinator(InputInterface $input) { $workerPids[] = $pid; } else { // Child - $argv = $_SERVER['argv']; $env = getenv(); $env[self::ENV_WORKER_CONF] = json_encode($workerconfig, JSON_THROW_ON_ERROR); - pcntl_exec($argv[0], array_slice($argv, 1), $env); + pcntl_exec(PHP_BINARY, $_SERVER['argv'], $env); } }