INN commit: trunk/frontends (ovdb_init.c)
INN Commit
Russ_Allbery at isc.org
Wed Dec 12 10:44:41 UTC 2007
Date: Wednesday, December 12, 2007 @ 02:44:41
Author: iulius
Revision: 7700
Patch daemonize-ovdb_init to make ovdb_init properly close
stdin/out/err when it becomes a daemon.
The issue was reported by Viktor Pilpenok and fixed by
Marco d'Itri. Thanks to both of them.
Modified:
trunk/frontends/ovdb_init.c
-------------+
ovdb_init.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
Modified: ovdb_init.c
===================================================================
--- ovdb_init.c 2007-11-04 18:36:42 UTC (rev 7699)
+++ ovdb_init.c 2007-12-12 10:44:41 UTC (rev 7700)
@@ -467,16 +467,11 @@
if(ovdb_conf.readserver) {
if(ovdb_check_pidfile(OVDB_SERVER_PIDFILE) == false) {
notice("starting ovdb server");
- switch(fork()) {
- case -1:
- sysdie("cannot fork");
- case 0:
- setsid();
- execl(concatpath(innconf->pathbin, "ovdb_server"),
- "ovdb_server", SPACES, NULL);
- syswarn("cannot exec ovdb_server");
- _exit(1);
- }
+ daemonize(innconf->pathtmp);
+ execl(concatpath(innconf->pathbin, "ovdb_server"), "ovdb_server",
+ SPACES, NULL);
+ syswarn("cannot exec ovdb_server");
+ _exit(1);
} else
warn("ovdb_server already running");
}
More information about the inn-committers
mailing list