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

-P option crashes when run from a systemd service #46

Open
chrisberkhout opened this issue Oct 14, 2022 · 0 comments
Open

-P option crashes when run from a systemd service #46

chrisberkhout opened this issue Oct 14, 2022 · 0 comments

Comments

@chrisberkhout
Copy link
Contributor

Logs looked like this:

Oct 13 19:15:29 hostname systemd[1]: Started Polling daemon for masterkit co2monitor.
Oct 13 19:15:29 hostname co2mond[31973]: co2mond: signal(SIGPIPE, SIG_IGN): Success
Oct 13 19:15:29 hostname systemd[1]: co2mon.service: Main process exited, code=exited, status=1/FAILURE
Oct 13 19:15:29 hostname systemd[1]: co2mon.service: Failed with result 'exit-code'.

The same command was working outside of systemd and it took me a while to figure out that it wasn't a resource authorization issue.

It was failing at co2mond/src/main.c:692.

Adding IgnoreSIGPIPE=no to the service definition avoids the problem.

Maybe there's a more graceful way to handle the signal(SIGPIPE, SIG_IGN) response with systemd's default behavior.

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

No branches or pull requests

1 participant