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

Should procServ exit >0 when the process is terminated by a signal? #58

Open
minijackson opened this issue Jun 16, 2023 · 1 comment · May be fixed by #59
Open

Should procServ exit >0 when the process is terminated by a signal? #58

minijackson opened this issue Jun 16, 2023 · 1 comment · May be fixed by #59
Assignees

Comments

@minijackson
Copy link

Hello!

We're currently using procServ with the --oneshot option, and ensuring that the systemd service has Restart=always. I think it's pretty nice since unexpected restarts are logged into journald.

One thing that I found out, is that if the process managed by procServ is killed (by SIGKILL, or SIGSEGV, for example), procServ returns 0.

This bit me at first because I had configured Restart=on-failure, and systemd saw that the process exited successfully.

I think returning 0 is surprising in this instance, and it might be nice to return >0. We might even want to exit with the standard "Fatal error signal" exit code: https://tldp.org/LDP/abs/html/exitcodes.html

Thanks a lot!

@ralphlange ralphlange self-assigned this Jun 16, 2023
@ralphlange
Copy link
Owner

Sounds very reasonable.

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

Successfully merging a pull request may close this issue.

2 participants