/** * Run the process. * * @param array $arguments The additional arguments to add to the call. * * @return Process */ public function spawn($arguments) { $cmd = sprintf('%s %s', escapeshellcmd($this->config->getPhpCliBinary()), $this->getArguments($arguments)); if ($this->config->isForceToBackgroundEnabled()) { $cmd .= '&'; } return new Process($cmd, $this->homePath, $this->getEnvironment(), null, null); }
/** * Create the process (automatically forcing to background if configured). * * @param array $arguments The additional arguments to add to the call. * * @return Process */ public function spawn(array $arguments) { return $this->buildInternal($arguments)->setForceBackground($this->config->isForceToBackgroundEnabled())->generate(); }