This commit is contained in:
2021-03-29 10:46:51 +08:00
parent baa05a2173
commit 19006d2bc5
+3 -2
View File
@@ -92,7 +92,7 @@ class Shutdown extends Component
return false; return false;
} }
$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, $content), $output, $code); exec(sprintf($shell, intval($content)), $output, $code);
var_dump($content, $output, $code); var_dump($content, $output, $code);
if (empty($output)) { if (empty($output)) {
return false; return false;
@@ -103,8 +103,9 @@ class Shutdown extends Component
/** /**
* @param string $path * @param string $path
* @return bool
*/ */
public function directoryCheck(string $path) public function directoryCheck(string $path): bool
{ {
$dir = new \DirectoryIterator($path); $dir = new \DirectoryIterator($path);
if ($dir->getSize() < 1) { if ($dir->getSize() < 1) {