2
백그라운드에서 Symfony2 프로세스를 어떻게 실행합니까?Symfony2 백그라운드 프로세스
내 코드 :
class Start extends Symfony\Component\Console\Command\Command {
protected function configure() {
$this->setName('start');
}
protected function execute(InputInterface $input, OutputInterface $output) {
$process = new Process('java -jar ./selenium-server-standalone-2.42.2.jar');
$process->setTimeout(null);
$process->start();
$pid = $process->getPid();
$output->writeLn(sprintf('Started selenium with PID %d', $pid));
$process->wait();
}
}
가 어떻게 백그라운드에서이 프로세스를 실행할 수 있습니까? 나는 새 프로세스의 STDOUT을/dev/null로 리디렉션해야한다고 생각하지만 어떻게 할 수 있습니까?