INN commit: branches/2.4/frontends (ovdb_init.c)
INN Commit
Russ_Allbery at isc.org
Sun Apr 6 08:47:48 UTC 2008
Date: Sunday, April 6, 2008 @ 01:47:48
Author: iulius
Revision: 7732
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:
branches/2.4/frontends/ovdb_init.c
-------------+
ovdb_init.c | 15 +++++----------
1 file changed, 5 insertions(+), 10 deletions(-)
Modified: ovdb_init.c
===================================================================
--- ovdb_init.c 2008-04-06 08:40:29 UTC (rev 7731)
+++ ovdb_init.c 2008-04-06 08:47:48 UTC (rev 7732)
@@ -466,16 +466,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