public function isLocked() { $pid = $this->lastPid(); return !is_null($pid) && posix_getsid($pid) ? true : false; }