mirror of
https://github.com/moqsien/processes.git
synced 2025-12-24 12:27:54 +08:00
options
This commit is contained in:
@@ -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 多进程模式下,用于标记主进程的环境变量的名称
|
||||
)
|
||||
|
||||
/*
|
||||
=======================
|
||||
进程状态:
|
||||
|
||||
2
procs.go
2
procs.go
@@ -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则需要重启
|
||||
|
||||
Reference in New Issue
Block a user