summaryrefslogtreecommitdiff
path: root/libc/unistd/daemon.c
diff options
context:
space:
mode:
authorPeter S. Mazinger <ps.m@gmx.net>2005-12-16 01:18:01 +0000
committerPeter S. Mazinger <ps.m@gmx.net>2005-12-16 01:18:01 +0000
commit403d3b6c026812d82647eabf9370722f3f1e7893 (patch)
treef4300320d7a7739990ad6b13aaf3918e65d94c2a /libc/unistd/daemon.c
parent6a6ae6e1a26f32fd896b0a7b740129161bfb008b (diff)
Convert all the rest, remove isxupper/isxlower, if someone objects, I'll add it back
Diffstat (limited to 'libc/unistd/daemon.c')
-rw-r--r--libc/unistd/daemon.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c
index 233dbbac4..4c18e55fa 100644
--- a/libc/unistd/daemon.c
+++ b/libc/unistd/daemon.c
@@ -26,6 +26,7 @@
#define dup2 __dup2
#define setsid __setsid
#define chdir __chdir
+#define fork __fork
#include <stdio.h>
#include <features.h>
@@ -45,7 +46,7 @@ int daemon( int nochdir, int noclose )
case 0:
break;
default:
- _exit(0);
+ _exit_internal(0);
}
if (setsid() == -1)
@@ -54,7 +55,7 @@ int daemon( int nochdir, int noclose )
/* Make certain we are not a session leader, or else we
* might reacquire a controlling terminal */
if (fork())
- _exit(0);
+ _exit_internal(0);
if (!nochdir)
chdir("/");