This commit is contained in:
2021-11-19 11:19:46 +08:00
parent 493ef65ce8
commit a44b7a31ef
+2 -2
View File
@@ -104,8 +104,8 @@ class HotReload extends Command
if (!empty($pid) && Process::kill($pid, 0)) { if (!empty($pid) && Process::kill($pid, 0)) {
Process::kill($pid, SIGTERM); Process::kill($pid, SIGTERM);
} }
if ($this->process instanceof Process) { if ($this->process && Process::kill($this->process->pid,0)) {
$this->process->exit(); Process::kill($this->process->pid) && Process::wait(true);
} }
while ($ret = Process::wait(true)) { while ($ret = Process::wait(true)) {
echo "PID={$ret['pid']}\n"; echo "PID={$ret['pid']}\n";