From 63c1617066a1bf202bd90ce646491e0808798c56 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 1 Nov 2005 16:07:33 +0000 Subject: use _exit() instead of exit() to terminate if forking fails git-svn-id: file:///home/lennart/svn/public/libdaemon/trunk@100 153bfa13-eec0-0310-be40-b0cb6a0e1b4b --- libdaemon/dfork.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libdaemon/dfork.c') diff --git a/libdaemon/dfork.c b/libdaemon/dfork.c index 5edcc75..5ed438d 100644 --- a/libdaemon/dfork.c +++ b/libdaemon/dfork.c @@ -227,7 +227,7 @@ pid_t daemon_fork(void) { } else { /* Second father */ close(pipe_fds[1]); - exit(0); + _exit(0); } fail: @@ -235,7 +235,7 @@ pid_t daemon_fork(void) { if (atomic_write(pipe_fds[1], &dpid, sizeof(dpid)) != sizeof(dpid)) daemon_log(LOG_ERR, "Failed to write error PID."); close(pipe_fds[1]); - exit(0); + _exit(0); } else { /* First father */ -- cgit