This commit is contained in:
2021-03-29 10:49:42 +08:00
parent b3a5ff56aa
commit 1886c7dbd4
+1 -2
View File
@@ -47,7 +47,7 @@ class Shutdown extends Component
$master_pid = Server()->setting['pid_file'] ?? PID_PATH; $master_pid = Server()->setting['pid_file'] ?? PID_PATH;
if (file_exists($master_pid)) { if (file_exists($master_pid)) {
$this->close(file_get_contents($master_pid)); $this->close($master_pid);
} }
$this->closeOther(); $this->closeOther();
} }
@@ -93,7 +93,6 @@ class Shutdown extends Component
} }
$shell = 'ps -eo pid,cmd,state | grep %d | grep -v grep'; $shell = 'ps -eo pid,cmd,state | grep %d | grep -v grep';
exec(sprintf($shell, intval($content)), $output, $code); exec(sprintf($shell, intval($content)), $output, $code);
var_dump($content, $output, sprintf($shell, intval($content)));
if (empty($output)) { if (empty($output)) {
return false; return false;
} }