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

systemd: use Type=simple and no fork to avoid PIDFile race #208

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

mdomsch
Copy link

@mdomsch mdomsch commented Feb 24, 2022

No description provided.

This is a long-running process that once started by systemd should
stay running forever. In the event of a fatal error and unclean exit,
we want systemd to restart the program. We use on-abnormal because
there are valid nonzero exit codes (EX_USAGE, EX_OSERR, EX_CONFIG)
which the program can properly return indicating a configuration or
command line error, or inability to allocate memory early on. In these
events, restarting would be inappropriate, but on-failure would try
anyhow.
@DemiMarie
Copy link

Would it be possible/desirable to use Type=notify instead?

@mdomsch
Copy link
Author

mdomsch commented Mar 20, 2022

Type=notify would be possible if the app is enhanced to call sd_notify(3) following startup. But this seems to only matter if we have services (e.g. the MTA) configured to depend on opendmarc such that it's not started until after opendmarc (and other similar milters) have started, which also is not the case. Right now there is no ordering between opendmarc, openarc, opendkim, and sendmail, at least on a CentOS 8 and a Fedora 35 system. Nor does postfix have a startup dependency ordering on these.

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

Successfully merging this pull request may close these issues.

2 participants