From: Guillem Jover Date: Tue, 15 May 2007 03:18:52 +0000 (+0000) Subject: * utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=57542dd67af0dce7b7c0656276bf60976e1806ca;p=dpkg * utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to avoid side effects while the parents terminate. --- diff --git a/ChangeLog b/ChangeLog index d212e820..1335216d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-05-15 Guillem Jover + + * utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to + avoid side effects while the parents terminate. + 2007-05-15 Guillem Jover * utils/start-stop-daemon.c (main): Move daemonizing code to ... diff --git a/utils/start-stop-daemon.c b/utils/start-stop-daemon.c index b0ad886d..be4885c5 100644 --- a/utils/start-stop-daemon.c +++ b/utils/start-stop-daemon.c @@ -264,7 +264,7 @@ daemonize(void) if (pid < 0) fatal("Unable to do first fork.\n"); else if (pid) /* Parent */ - exit(0); + _exit(0); /* Create a new session */ #ifdef HAVE_SETSID @@ -277,7 +277,7 @@ daemonize(void) if (pid < 0) fatal("Unable to do second fork.\n"); else if (pid) /* Parent */ - exit(0); + _exit(0); if (quietmode < 0) printf("done.\n");