From 0afdfb49113543e69f72ca64b039822dc3e43ee2 Mon Sep 17 00:00:00 2001 From: Joachim Nilsson Date: Mon, 16 Dec 2019 13:25:48 +0100 Subject: [PATCH] syslogd: Handle multiple invocations of SIGHUP Signed-off-by: Joachim Nilsson --- src/syslogd.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/syslogd.c b/src/syslogd.c index 0ac6e51..ad38d80 100644 --- a/src/syslogd.c +++ b/src/syslogd.c @@ -426,8 +426,8 @@ int main(int argc, char *argv[]) int rc; rc = socket_poll(NULL); - if (restart) { - restart = 0; + if (restart > 0) { + restart--; logit("\nReceived SIGHUP, reloading syslogd.\n"); init(); @@ -3026,7 +3026,7 @@ static void logit(char *fmt, ...) */ void reload(int signo) { - restart = 1; + restart++; } /**