From b7d4861c0c4d62be3b8927ad2cc4e066c9a03674 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Fri, 28 Oct 2022 15:58:58 +0800 Subject: [PATCH] update: sub exit function --- kms.php | 6 ++++-- src/Daemon.php | 24 ++++++++++++++---------- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/kms.php b/kms.php index c307f9c..4fc65e0 100755 --- a/kms.php +++ b/kms.php @@ -120,12 +120,14 @@ pcntl_signal(SIGCHLD, function() { // receive SIGCHLD signal pcntl_signal(SIGTERM, function() { // receive SIGTERM signal global $NGINX, $PHP_FPM, $VLMCSD; logging::info('Get SIGTERM -> exit'); - subExit($NGINX['pidFile'], $PHP_FPM['pidFile'], $VLMCSD['pidFile']); + subExit($NGINX, $PHP_FPM, $VLMCSD); + exit; }); pcntl_signal(SIGINT, function() { // receive SIGINT signal global $NGINX, $PHP_FPM, $VLMCSD; logging::info('Get SIGINT -> exit'); - subExit($NGINX['pidFile'], $PHP_FPM['pidFile'], $VLMCSD['pidFile']); + subExit($NGINX, $PHP_FPM, $VLMCSD); + exit; }); logging::info('Loading kms-server (' . $VERSION . ')'); diff --git a/src/Daemon.php b/src/Daemon.php index f223195..a34c63a 100644 --- a/src/Daemon.php +++ b/src/Daemon.php @@ -1,7 +1,5 @@