From 8a4be3ac97ff277b5d6f16bcf36c50962e098061 Mon Sep 17 00:00:00 2001 From: as2252258 Date: Sun, 10 Apr 2022 14:54:46 +0800 Subject: [PATCH] modify mysql result --- Inotify.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Inotify.php b/Inotify.php index 6baf2de..6c4c41b 100644 --- a/Inotify.php +++ b/Inotify.php @@ -63,11 +63,12 @@ class Inotify extends BaseProcess public function onSigterm(): static { - $this->isStop = true; + pcntl_signal(SIGTERM, function () { + $this->isStop = true; - $this->clear(); - - return parent::onSigterm(); // TODO: Change the autogenerated stub + $this->clear(); + }); + return $this; }