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
cachvico opened this Issue Sep 28, 2018 · 3 comments

Comments

2 participants
@cachvico

cachvico 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!

@cachvico

This comment has been minimized.

Show comment
Hide comment
@cachvico

cachvico Sep 28, 2018

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

cachvico commented Sep 28, 2018

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

@mnaberez mnaberez added the question label Sep 28, 2018

@mnaberez

This comment has been minimized.

Show comment
Hide comment
@mnaberez

mnaberez Sep 28, 2018

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

Member

mnaberez commented Sep 28, 2018

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

This comment has been minimized.

Show comment
Hide comment
@mnaberez

mnaberez Sep 28, 2018

Member

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.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment