Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Return code convention mismatch with Unix #1153

Closed
LDMFD opened this issue Sep 28, 2018 · 3 comments
Closed

Return code convention mismatch with Unix #1153

LDMFD opened this issue Sep 28, 2018 · 3 comments
Labels

Comments

@LDMFD
Copy link

LDMFD commented Sep 28, 2018

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: golang/go#24284

Thanks!

@LDMFD
Copy link
Author

LDMFD commented Sep 28, 2018

p.s. I'm not sure why configuration exitcodes defaults to 0,2 instead of just 0

@mnaberez
Copy link
Member

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).

@mnaberez
Copy link
Member

mnaberez commented Sep 28, 2018

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 837c159, 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.

jleveque pushed a commit to jleveque/supervisor that referenced this issue Mar 20, 2019
alexsilva pushed a commit to alexsilva/supervisor that referenced this issue Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants