syslogd: Handle multiple invocations of SIGHUP
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
parent
0e7c76c3f5
commit
0afdfb4911
@ -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++;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user