改名
This commit is contained in:
@@ -142,14 +142,13 @@ class HotReload extends Command
|
|||||||
public function trigger_reload()
|
public function trigger_reload()
|
||||||
{
|
{
|
||||||
$this->logger->warning('change reload');
|
$this->logger->warning('change reload');
|
||||||
$pid = file_get_contents(storage('.swoole.pid'));
|
// $pid = file_get_contents(storage('.swoole.pid'));
|
||||||
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 instanceof Process) {
|
||||||
$this->process->exit();
|
$this->process->exit();
|
||||||
}
|
}
|
||||||
Process::wait(true);
|
|
||||||
$this->process = new Process(function (Process $process) {
|
$this->process = new Process(function (Process $process) {
|
||||||
$process->exec(PHP_BINARY, [APP_PATH . "kiri.php", "sw:server", "restart"]);
|
$process->exec(PHP_BINARY, [APP_PATH . "kiri.php", "sw:server", "restart"]);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user