Minor, don't touch PID file on SIGHUP in debug mode

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson 2019-11-12 13:24:50 +01:00
parent f606667038
commit 095aa56996

View File

@ -94,7 +94,7 @@ static char sccsid[] __attribute__((unused)) =
char *ConfFile = _PATH_LOGCONF;
char *PidFile = _PATH_LOGPID;
char ctty[] = _PATH_CONSOLE;
char ctty[] = _PATH_CONSOLE;
static int debugging_on = 0;
static int restart = 0;
@ -438,7 +438,7 @@ int main(int argc, char *argv[])
logit("\nReceived SIGHUP, reloading syslogd.\n");
init();
if (pidfile(PidFile))
if (!Debug && pidfile(PidFile))
ERR("Failed writing %s", PidFile);
continue;
}