Author: guillem
Date: 2007-05-15 03:18:52 +0000 (Tue, 15 May 2007)
New Revision: 775
Modified:
trunk/ChangeLog
trunk/utils/start-stop-daemon.c
Log:
* utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to
avoid side effects while the parents terminate.
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2007-05-15 02:53:36 UTC (rev 774)
+++ trunk/ChangeLog 2007-05-15 03:18:52 UTC (rev 775)
@@ -1,5 +1,10 @@
2007-05-15 Guillem Jover <[EMAIL PROTECTED]>
+ * utils/start-stop-daemon.c (daemonize): Use _exit instead of exit, to
+ avoid side effects while the parents terminate.
+
+2007-05-15 Guillem Jover <[EMAIL PROTECTED]>
+
* utils/start-stop-daemon.c (main): Move daemonizing code to ...
(daemonize): ... here. New function. Fork twice.
Modified: trunk/utils/start-stop-daemon.c
===================================================================
--- trunk/utils/start-stop-daemon.c 2007-05-15 02:53:36 UTC (rev 774)
+++ trunk/utils/start-stop-daemon.c 2007-05-15 03:18:52 UTC (rev 775)
@@ -264,7 +264,7 @@
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 @@
if (pid < 0)
fatal("Unable to do second fork.\n");
else if (pid) /* Parent */
- exit(0);
+ _exit(0);
if (quietmode < 0)
printf("done.\n");
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]