Task/Process/ProcessLauncherTask.php
protected function launchProcess(ProcessState $state)
    {
        $pathFinder = new PhpExecutableFinder();
        $consolePath = $this->kernel->getRootDir().'/../bin/console';
        $logDir = $this->kernel->getLogDir().'/process';
        $processCode = $this->getOption($state, 'process');
        $processOptions = $this->getOption($state, 'process_options');

        $fs = new Filesystem();
        $fs->mkdir($logDir);
        if (!$fs->exists($consolePath)) {
            throw new \RuntimeException("Unable to resolve path to symfony console '{$consolePath}'");
        }

        $arguments = [
            'nohup',
            $pathFinder->find(),
            $consolePath,
            '--env='.$this->kernel->getEnvironment(),
            'cleverage:process:execute',
            '--input-from-stdin',
        ];

        $arguments = array_merge($arguments, $processOptions);
        $arguments[] = $processCode;

        $process = new Process($arguments, null, null, $state->getInput());
        $process->setCommandLine($process->getCommandLine());
        $process->inheritEnvironmentVariables();
        $process->enableOutput();
        $process->start();

        return $process;
    }
protected function launchProcess(ProcessState $state)
    {
        $pathFinder = new PhpExecutableFinder();
        $consolePath = $this->kernel->getRootDir().'/../bin/console';
        $logDir = $this->kernel->getLogDir().'/process';
        $processCode = $this->getOption($state, 'process');
        $processOptions = $this->getOption($state, 'process_options');

        $fs = new Filesystem();
        $fs->mkdir($logDir);
        if (!$fs->exists($consolePath)) {
            throw new \RuntimeException("Unable to resolve path to symfony console '{$consolePath}'");
        }

        $arguments = [
            'nohup',
            $pathFinder->find(),
            $consolePath,
            '--env='.$this->kernel->getEnvironment(),
            'cleverage:process:execute',
            '--input-from-stdin',
        ];

        $arguments = array_merge($arguments, $processOptions);
        $arguments[] = $processCode;

        $process = new Process($arguments, null, null, $state->getInput());
        $process->setCommandLine($process->getCommandLine());
        $process->inheritEnvironmentVariables();
        $process->enableOutput();
        $process->start();

        return $process;
    }
@param ProcessState $state

@throws \Symfony\Component\Process\Exception\LogicException
@throws \Symfony\Component\Process\Exception\RuntimeException
@throws \Symfony\Component\OptionsResolver\Exception\ExceptionInterface
@throws \Symfony\Component\Filesystem\Exception\IOException
@throws \InvalidArgumentException
@throws \RuntimeException
@throws \Symfony\Component\Process\Exception\InvalidArgumentException

@return \Symfony\Component\Process\Process