pid); } /** * @param Process $process * @throws Exception */ public function _load(Process $process) { putenv('environmental=' . Snowflake::PROCESS); fire(Event::SERVER_WORKER_START); if (Snowflake::getPlatform()->isLinux()) { name($process->pid, $this->getPrefix()); } if (method_exists($this, 'before')) { $this->before($process); } if (!Snowflake::getPlatform()->isMac()) { if (method_exists($this, 'getProcessName')) { swoole_set_process_name($this->getProcessName()); } } $this->onHandler($process); } /** * @return string */ #[Pure] private function getPrefix(): string { return static::class; } }