avoid side effects while the parents terminate.
+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 ...
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
if (pid < 0)
fatal("Unable to do second fork.\n");
else if (pid) /* Parent */
- exit(0);
+ _exit(0);
if (quietmode < 0)
printf("done.\n");