From 681f1eb1812294dc256b1d949abd75c535b4f2fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 29 Mar 2021 10:52:46 +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 --- HttpServer/Shutdown.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index cfcf3c55..c736607e 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -127,9 +127,7 @@ class Shutdown extends Component */ public function close(string $value) { - $resource = fopen($value, 'r'); - $content = fgets($resource); - fclose($resource); + $content = file_get_contents($value); while ($this->pidIsExists($content)) { // exec('kill -15 ' . $content);