diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-04 16:57:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-04 16:57:02 +0000 |
commit | 0e9e1f1e991347ffd7894188634d9ebe8a6004db (patch) | |
tree | 5edbfbb31a4f1f72e5363ec411f60d5f14eba457 /usr.sbin | |
parent | c7f23e7aa047b55c1d294dee4251a2259c21a1a6 (diff) |
do not whack pid file if run -d; hwr@pilhuhn.de
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/syslogd/syslogd.c | 10 |
1 files 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"); |