fyi, there can be issues with Go processes not restarting on failure due to panic() which exits the program with exit code 2.
Discussion here: https://groups.google.com/forum/#!msg/golang-nuts/u9NgKibJsKI/XxCdDihFDAAJ
Go-lang issue: https://github.com/golang/go/issues/24284
Thanks!
p.s. I'm not sure why configuration exitcodes defaults to 0,2 instead of just 0
I am going to close this issue because the expected exit codes can already be changed with exitcodes= in the configuration file. You may need change this value for a particular program (go or otherwise).
p.s. I'm not sure why configuration exitcodes defaults to 0,2 instead of just 0
I am not sure. I suspect it was because some commands return exit status 2 for incorrect arguments. I think the original idea may have been that running a command with incorrect arguments again could not succeed, so don't automatically restart it by default.
We are coming up on another major version of Supervisor so we have the opportunity to change the default value for exitcodes=. In 837c159ae51f3bf12c1d30a8cb44f3450611983c, I changed it from 0,2 to just 0. I think restarting a program with incorrect arguments again is wasteful but probably not a problem, but failing to recognize the crash of a Golang program is likely to be a problem.