From e7ace878266655982d79d14e214710f0eaf40e24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=90=91=E6=9E=97?= Date: Mon, 11 Jul 2022 17:45:15 +0800 Subject: [PATCH] modify plugin name --- Abstracts/BaseProcess.php | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/Abstracts/BaseProcess.php b/Abstracts/BaseProcess.php index 597a251..3e8676c 100644 --- a/Abstracts/BaseProcess.php +++ b/Abstracts/BaseProcess.php @@ -85,23 +85,9 @@ abstract class BaseProcess implements OnProcessInterface /** - * + * @return $this */ - public function onSigterm(): static - { - if (!Context::inCoroutine()) { - Process::signal(SIGTERM, fn($data) => $this->onShutdown($data)); - } else { - $listen = function () { - $data = Coroutine::waitSignal(SIGTERM, -1); - if ($data) { - $this->onShutdown($data); - } - }; - Coroutine::create($listen); - } - return $this; - } + abstract public function onSigterm(): static; /**