/** * * @return Process * @throws Exception */ public function getProcess() { $pidInfo = $this->_getPidInfoFromFile(); if (!$pidInfo) { throw new Exception('process does not exist'); } if ($this->_processExists($pidInfo[0], $pidInfo[1])) { return Process::process($pidInfo[0]); } throw new Exception('process does not exist'); }