支持优雅退出

This commit is contained in:
刘祥超
2020-10-28 11:19:06 +08:00
parent 0be8b78201
commit 1d6b0559e6
19 changed files with 238 additions and 15 deletions

View File

@@ -150,9 +150,6 @@ func (this *AppCmd) Run(main func()) {
return
}
// 记录PID
_ = this.writePid()
// 日志
writer := new(LogWriter)
writer.Init()
@@ -227,8 +224,3 @@ func (this *AppCmd) runStatus() {
func (this *AppCmd) checkPid() *os.Process {
return CheckPid(Tea.Root + "/bin/pid")
}
// 写入PID
func (this *AppCmd) writePid() error {
return WritePid(Tea.Root + "/bin/pid")
}