From b70f7054502bc654b3aac2b3389c90a7ad9af4ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Mon, 29 Mar 2021 11:12:41 +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, 2 insertions(+), 2 deletions(-) diff --git a/HttpServer/Shutdown.php b/HttpServer/Shutdown.php index a078da0c..1c1890b9 100644 --- a/HttpServer/Shutdown.php +++ b/HttpServer/Shutdown.php @@ -94,9 +94,9 @@ class Shutdown extends Component if (intval($content) < 1) { return false; } - $shell = 'ps -eo pid,state | grep %d | grep %s | grep -v grep'; + $shell = 'ps -eo pid,state | grep %d | grep \'%s\' | grep -v grep'; exec(sprintf($shell, intval($content), Config::get('id')), $output, $code); - var_dump(sprintf($shell, intval($content))); + var_dump(sprintf($shell, intval($content), Config::get('id'))); if (empty($output)) { return false; }