From 9b0a0825919fc3165d45f5417f681473c817ad72 Mon Sep 17 00:00:00 2001 From: deraadt Date: Fri, 4 Apr 1997 16:57:01 +0000 Subject: [PATCH] do not whack pid file if run -d; hwr@pilhuhn.de --- usr.sbin/syslogd/syslogd.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.sbin/syslogd/syslogd.c b/usr.sbin/syslogd/syslogd.c index 84fec5d551c..68d5b188c83 100644 --- a/usr.sbin/syslogd/syslogd.c +++ b/usr.sbin/syslogd/syslogd.c @@ -306,10 +306,12 @@ main(argc, argv) } /* tuck my process id away */ - fp = fopen(PidFile, "w"); - if (fp != NULL) { - fprintf(fp, "%d\n", getpid()); - (void) fclose(fp); + if (!Debug) { + fp = fopen(PidFile, "w"); + if (fp != NULL) { + fprintf(fp, "%d\n", getpid()); + (void) fclose(fp); + } } dprintf("off & running....\n"); -- 2.20.1