/** * @return bool * @throws \JakubOnderka\PhpParallelLint\RunTimeException */ public function isFinished() { $isFinished = parent::isFinished(); if ($isFinished && !$this->done) { $this->done = true; $output = $this->getOutput(); $this->processLines($output); } return $isFinished; }
protected function doAmfRequestInProcess($request) { $process = new PhpProcess($this->getAmfScript($request)); $process->run(); if (!$process->isSuccessful() || !preg_match('/^O\\:\\d+\\:/', $process->getOutput())) { throw new \RuntimeException($process->getErrorOutput()); } return unserialize($process->getOutput()); }
public static function start($file, $params = "") { $cmd = realpath(Yii::getPathOfAlias('webroot') . '/' . trim($file, '/')); if (is_file($cmd)) { PhpProcess::checkPhp(); if (substr(php_uname(), 0, 7) == "Windows") { exec("plansys\\commands\\shell\\psexec.exe -accepteula -d php " . $cmd . " " . $params, $output, $input); return $input; } else { $pid = exec("php " . $cmd . " " . $params . " > /dev/null 2>&1 & echo \$!;", $output, $input); return $pid; } } else { throw new CException("File Not Found " . $cmd); } }
/** * @return bool */ public function isFail() { return defined('PHP_WINDOWS_VERSION_MAJOR') ? $this->getStatusCode() === 1 : parent::isFail(); }