This commit is contained in:
2021-11-04 18:27:41 +08:00
parent 3ae85beb16
commit 497cd95731
@@ -65,11 +65,12 @@ class FileChangeCustomProcess extends Command
} }
$make = Barrier::make(); $make = Barrier::make();
go(function () { go(function () {
$this->source = proc_open("php " . APP_PATH . "kiri.php sw:server restart", $this->source = proc_open('php',
[ [
0 => ["pipe", "r"], // 标准输入,子进程从此管道中读取数据 0 => ["pipe", "r"], // 标准输入,子进程从此管道中读取数据
] ]
, $this->pipes); , $this->pipes);
fwrite($this->pipes[0], APP_PATH . "kiri.php sw:server restart");
}); });
go(function () { go(function () {
$sign = Coroutine::waitSignal(SIGTERM, -1); $sign = Coroutine::waitSignal(SIGTERM, -1);
@@ -101,7 +102,6 @@ class FileChangeCustomProcess extends Command
} }
/** /**
* 重启 * 重启
* @throws Exception * @throws Exception
@@ -114,7 +114,9 @@ class FileChangeCustomProcess extends Command
// STDIN, STDOUT // STDIN, STDOUT
// ], $this->pipes); // ], $this->pipes);
fwrite($this->pipes[0], "php " . APP_PATH . "kiri.php sw:server restart"); fwrite($this->pipes[0], APP_PATH . "kiri.php sw:server restart");
// fwrite($this->pipes[0], "php " . APP_PATH . "kiri.php sw:server restart");
} }
} }