bin/54113: [PATCH] devd(8) doesn't write correct pid into
/var/run/devd.pid
Ruslan Ermilov
ru at FreeBSD.org
Fri Jul 4 14:30:13 PDT 2003
The following reply was made to PR bin/54113; it has been noted by GNATS.
From: Ruslan Ermilov <ru at FreeBSD.org>
To: Lukas Ertl <l.ertl at univie.ac.at>
Cc: bug-followup at FreeBSD.org
Subject: Re: bin/54113: [PATCH] devd(8) doesn't write correct pid into /var/run/devd.pid
Date: Sat, 5 Jul 2003 00:22:05 +0300
A better fix might be:
%%%
Index: devd.cc
===================================================================
RCS file: /home/ncvs/src/sbin/devd/devd.cc,v
retrieving revision 1.14
diff -u -p -r1.14 devd.cc
--- devd.cc 2 May 2003 17:38:08 -0000 1.14
+++ devd.cc 4 Jul 2003 21:18:19 -0000
@@ -596,6 +596,7 @@ event_loop(void)
if (Dflag)
fprintf(stderr, "Calling daemon\n");
daemon(0, 0);
+ cfg.drop_pidfile();
once++;
}
}
@@ -743,9 +744,10 @@ main(int argc, char **argv)
}
cfg.parse();
- if (!dflag && nflag)
+ if (!dflag && nflag) {
daemon(0, 0);
- cfg.drop_pidfile();
+ cfg.drop_pidfile();
+ }
signal(SIGHUP, gensighand);
signal(SIGINT, gensighand);
signal(SIGTERM, gensighand);
%%%
--
Ruslan Ermilov Sysadmin and DBA,
ru at sunbay.com Sunbay Software Ltd,
ru at FreeBSD.org FreeBSD committer
More information about the freebsd-bugs
mailing list