syslogd: Handle multiple invocations of SIGHUP

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-12-16 13:25:48 +01:00
parent 0e7c76c3f5
commit 0afdfb4911

View File

@ -426,8 +426,8 @@ int main(int argc, char *argv[])
int rc; int rc;
rc = socket_poll(NULL); rc = socket_poll(NULL);
if (restart) { if (restart > 0) {
restart = 0; restart--;
logit("\nReceived SIGHUP, reloading syslogd.\n"); logit("\nReceived SIGHUP, reloading syslogd.\n");
init(); init();
@ -3026,7 +3026,7 @@ static void logit(char *fmt, ...)
*/ */
void reload(int signo) void reload(int signo)
{ {
restart = 1; restart++;
} }
/** /**