From 516c7612a54405ff316aead409077a1fd0bdc179 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 8 Jul 2021 18:02:21 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- System/Application.php | 4 +++- System/Process/Process.php | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/System/Application.php b/System/Application.php index c9d544fd..b121167a 100644 --- a/System/Application.php +++ b/System/Application.php @@ -35,7 +35,6 @@ use function Co\run; * @package Snowflake * * @property-read Config $config - * @property-read WchatProviders $wchat */ class Application extends BaseApplication { @@ -62,6 +61,9 @@ class Application extends BaseApplication } + + + /** * @param Closure|array $closure * @return $this diff --git a/System/Process/Process.php b/System/Process/Process.php index 64f08398..4c32a6ef 100644 --- a/System/Process/Process.php +++ b/System/Process/Process.php @@ -41,8 +41,8 @@ abstract class Process extends \Swoole\Process implements SProcess putenv('environmental=' . Snowflake::PROCESS); fire(Event::SERVER_WORKER_START); - if (Snowflake::getPlatform()->isLinux()) { - swoole_set_process_name($this->getProcessName()); + if (Snowflake::getPlatform()->isLinux()) { + name($this->pid, $this->getProcessName()); } if (method_exists($this, 'before')) { $this->before($process);