Skip to content

Commit e61ebef

Browse files
committed
Fix SIGHUP: reload config instead of shutting down
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
1 parent 8e90a8c commit e61ebef

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

opendmarc/opendmarc.8.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ output.
128128
Print the version number, whether SPF support is compiled in, and the
129129
libmilter version, and then exit without doing anything else.
130130
.SH SIGNALS
131-
Upon receiving SIGUSR1, if the filter was started with a configuration
131+
Upon receiving
132+
.B SIGHUP
133+
or
134+
.BR SIGUSR1 ,
135+
if the filter was started with a configuration
132136
file, it will be re-read and the new values used. Note that any
133137
command line overrides provided at startup time will be lost when this is
134138
done. Also, the following configuration file values (and their corresponding

opendmarc/opendmarc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3849,12 +3849,12 @@ struct smfiDesc smfilter =
38493849
static void
38503850
dmarcf_sighandler(int sig)
38513851
{
3852-
if (sig == SIGINT || sig == SIGTERM || sig == SIGHUP)
3852+
if (sig == SIGINT || sig == SIGTERM)
38533853
{
38543854
diesig = sig;
38553855
die = TRUE;
38563856
}
3857-
else if (sig == SIGUSR1)
3857+
else if (sig == SIGHUP || sig == SIGUSR1)
38583858
{
38593859
if (conffile != NULL)
38603860
reload = TRUE;

0 commit comments

Comments
 (0)