This commit is contained in:
moqsien
2022-09-06 20:11:05 +08:00
parent dd0c240199
commit cdd76c1e36
2 changed files with 1 additions and 16 deletions

View File

@@ -13,21 +13,6 @@ const (
AutoReStartFalse AutoReStart = "false" // 关闭自动重启功能
)
/*
=======================
进程模式:
1、多进程
2、单进程
*/
type ProcessMode int
const (
SingleProcess ProcessMode = 0 // Single 单进程模式
MultiProcess ProcessMode = 1 // Multi 多进程模式
RemarkOfMasterEnv string = "MasterProcessRemark" // Remark 多进程模式下,用于标记主进程的环境变量的名称
)
/*
=======================
进程状态:

View File

@@ -176,7 +176,7 @@ func (that *ProcessPlus) IsAutoRestart() bool {
} else {
that.Lock.RLock()
defer that.Lock.RUnlock()
if that.Cmd != nil && that.Cmd.ProcessState != nil {
if that.Cmd != nil && that.ProcessState != nil {
exitCode, err := that.GetExitCode()
// 如果自动重启设置为unexpected则表示在配置中已明确的退出code不需要重启
// 不在预设的配置中的退出code则需要重启