This commit is contained in:
2021-11-04 19:00:53 +08:00
parent f40b79bb08
commit 79b32df2d5
@@ -104,10 +104,12 @@ class FileChangeCustomProcess extends Command
{ {
Kiri::getDi()->get(Logger::class)->warning('change reload'); Kiri::getDi()->get(Logger::class)->warning('change reload');
$content = file_get_contents(storage('.swoole.pid')); $content = (int)file_get_contents(storage('.swoole.pid'));
if (!empty($content)) { if (!empty($content)) {
var_dump($content); var_dump($content, Process::kill($content, 0));
Process::kill((int)$content, SIGTERM); if (Process::kill($content, 0)) {
Process::kill($content, SIGTERM);
}
} }
proc_open("php " . APP_PATH . "kiri.php", [], $pipes); proc_open("php " . APP_PATH . "kiri.php", [], $pipes);
} }