a) 启动即退出,exit code为0, 那么supervisor会在重试3试后停止重试,进程状态为FATAL。 b) 启动即退出,exit code为1, 那么supervisor会在重试3试后停止重试,进程状态为FATAL。 c) 启动3秒后退出,exit code为1, 那么supervisor会无限重启程序,无视startretries。 d) 启动3秒后退出,exit code为0, 那么supervisor不会重启,进程状态为EXIT。
abd都是预期行为,为什么c会无限重启呢?这好象不太合理啊?非正常退出不是应该重启3次吗?
supervisor是debian 7自带的。
autorestart
May be one of false, unexpected, or true. If false, the process will never be autorestarted. If unexpected, the process will be restart when the program exits with an exit code that is not one of the exit codes associated with this process’ configuration (see exitcodes). If true, the process will be unconditionally restarted when it exits, without regard to its exit code.