Skip to content

Fix SIGHUP: reload config instead of shutting down#323

Open
thegushi wants to merge 1 commit into
trusteddomainproject:masterfrom
thegushi:fix/sighup-reload
Open

Fix SIGHUP: reload config instead of shutting down#323
thegushi wants to merge 1 commit into
trusteddomainproject:masterfrom
thegushi:fix/sighup-reload

Conversation

@thegushi
Copy link
Copy Markdown
Collaborator

Closes #322.

SIGHUP was grouped with SIGTERM and SIGINT in the signal handler,
causing the filter to shut down — contrary to Unix convention, where
SIGHUP is the standard signal for configuration reload or log reopen.

The reload path already existed (previously reachable only via SIGUSR1);
this change folds SIGHUP into the same condition.

SIGTERM and SIGINT remain the shutdown signals. SIGUSR1 continues
to work as before.

Changes:

  • opendmarc/opendmarc.c: remove SIGHUP from the shutdown condition;
    add it to the reload condition alongside SIGUSR1
  • opendmarc/opendmarc.8.in: document that both SIGHUP and SIGUSR1
    trigger a configuration reload

SIGHUP was treated identically to SIGTERM, causing the filter to exit.
Unix convention is that SIGHUP triggers a configuration reload in
long-running daemons. The reload path already exists (previously only
reachable via SIGUSR1); SIGHUP is now folded into it.

SIGUSR1 continues to work as before. SIGTERM and SIGINT remain the
shutdown signals.

Fixes: trusteddomainproject#322
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.

SIGHUP shuts down the daemon instead of reloading config

1 participant