public function isCurrent() { return \posix_getpid() == $this->_pid; }
/** * * @return Process */ public static function current() { $pid = \posix_getpid(); if (!self::$_current || !self::$_current->isCurrent()) { self::$_current = new Process($pid, \posix_getppid()); } return self::$_current; }