diff --git a/kiri-engine/FileListen/HotReload.php b/kiri-engine/FileListen/HotReload.php index 3d536299..70a4145a 100644 --- a/kiri-engine/FileListen/HotReload.php +++ b/kiri-engine/FileListen/HotReload.php @@ -83,7 +83,6 @@ class HotReload extends Command $this->trigger_reload(); var_dump(getmypid()); - Process::signal(SIGTERM, [$this, 'onSignal']); Process::signal(SIGKILL, [$this, 'onSignal']); @@ -144,11 +143,9 @@ class HotReload extends Command // if (!empty($pid) && Process::kill($pid, 0)) { // Process::kill($pid, SIGTERM); // } - var_dump('kill process.'); if ($this->process && Process::kill($this->process->pid,0)) { Process::kill($this->process->pid) && Process::wait(true); } - var_dump('kill process end.'); $this->process = new Process(function (Process $process) { $process->exec(PHP_BINARY, [APP_PATH . "kiri.php", "sw:server", "restart"]); }); diff --git a/kiri-engine/FileListen/Inotify.php b/kiri-engine/FileListen/Inotify.php index 933ea365..6fb0439f 100644 --- a/kiri-engine/FileListen/Inotify.php +++ b/kiri-engine/FileListen/Inotify.php @@ -63,8 +63,6 @@ class Inotify if (!($events = inotify_read($this->inotify))) { return; } - - var_dump($this->process->isReloading); if ($this->process->isReloading) { if (!$this->process->isReloadingOut) { $this->process->isReloadingOut = true; @@ -81,12 +79,8 @@ class Inotify if ($this->process->int !== -1) { return; } - usleep(200); - $this->reload(); - - $this->process->isReloading = true; } } } @@ -98,9 +92,6 @@ class Inotify { $this->process->isReloading = true; $this->process->trigger_reload(); - - var_dump('trigger_reload'); - $this->clearWatch(); foreach ($this->dirs as $root) { $this->watch($root);