]> err.no Git - dpkg/commitdiff
* utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to
authorGuillem Jover <guillem@debian.org>
Tue, 15 May 2007 03:18:52 +0000 (03:18 +0000)
committerGuillem Jover <guillem@debian.org>
Tue, 15 May 2007 03:18:52 +0000 (03:18 +0000)
avoid side effects while the parents terminate.

ChangeLog
utils/start-stop-daemon.c

index d212e82096a625ebf5a2a3d92c9639dbf8ff90b5..1335216d2afe0f2da7328fb890169933ee06e98a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-15  Guillem Jover  <guillem@debian.org>
+
+       * utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to
+       avoid side effects while the parents terminate.
+
 2007-05-15  Guillem Jover  <guillem@debian.org>
 
        * utils/start-stop-daemon.c (main): Move daemonizing code to ...
index b0ad886d7ed3136600a84cc53c9d10eb88a4cab0..be4885c5a7942d15b9f80877eabc25b66f47fe45 100644 (file)
@@ -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");