protected static function saveMasterPid() { self::$_masterPid = posix_getpid(); if (false === @file_put_contents(self::$pidFile, self::$_masterPid)) { throw new Exception('can not save pid to ' . self::$pidFile); } }