Kraken\Util\System\SystemInterface::existsPid PHP Method

existsPid() public method

Checks if process with given pid exists, returns whether operation was successful.
public existsPid ( string $pid ) : boolean
$pid string
return boolean
    public function existsPid($pid);

Usage Example

Example #1
0
 /**
  * Copy data from persistent storage to temporary one.
  *
  * @return mixed
  * @throws ReadException
  */
 private function selectFromStorage()
 {
     if (!$this->fs->exists($this->fsPath)) {
         return $this->getEmptyStorage();
     }
     $data = json_decode($this->fs->read($this->fsPath), true);
     if (!isset($data['pid']) || !$this->system->existsPid($data['pid'])) {
         return $this->getEmptyStorage();
     }
     return $data;
 }
All Usage Examples Of Kraken\Util\System\SystemInterface::existsPid