This commit is contained in:
2021-03-29 11:12:41 +08:00
parent 82f7966de3
commit b70f705450
+2 -2
View File
@@ -94,9 +94,9 @@ class Shutdown extends Component
if (intval($content) < 1) { if (intval($content) < 1) {
return false; 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); 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)) { if (empty($output)) {
return false; return false;
} }