Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@chrisberkhout

Description

@chrisberkhout

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions