From 6418b3288bd57f2422a37d55358072d91882b266 Mon Sep 17 00:00:00 2001 From: whwyy Date: Wed, 24 Apr 2024 14:31:06 +0800 Subject: [PATCH] eee --- Etcd.php | 2 +- RpcProcess.php | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Etcd.php b/Etcd.php index 552a352..6a8faaa 100644 --- a/Etcd.php +++ b/Etcd.php @@ -38,7 +38,7 @@ class Etcd extends Component } $key = 'center.service.' . gethostbyname(gethostname()); - pcntl_signal(SIGINT, function () use ($key) { + \pcntl_signal(SIGINT, function () use ($key) { $this->isEnd = true; $this->client->del($key); }); diff --git a/RpcProcess.php b/RpcProcess.php index 7726aa5..933d718 100644 --- a/RpcProcess.php +++ b/RpcProcess.php @@ -39,8 +39,8 @@ class RpcProcess extends BaseProcess if (Context::inCoroutine()) { Coroutine::create(fn() => $this->onShutdown(Coroutine::waitSignal(SIGTERM | SIGINT))); } else { - pcntl_signal(SIGTERM, [$this, 'onStop']); - pcntl_signal(SIGINT, [$this, 'onStop']); + \pcntl_signal(SIGTERM, [$this, 'onStop']); + \pcntl_signal(SIGINT, [$this, 'onStop']); } return $this; }