diff options
Diffstat (limited to 'libc/unistd/daemon.c')
-rw-r--r-- | libc/unistd/daemon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c index c584d8fc5..3c54ad234 100644 --- a/libc/unistd/daemon.c +++ b/libc/unistd/daemon.c @@ -55,12 +55,12 @@ int daemon( int nochdir, int noclose ) if (!nochdir) chdir("/"); - if (!noclose && (fd = open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { + if (!noclose && (fd = __open(_PATH_DEVNULL, O_RDWR, 0)) != -1) { dup2(fd, STDIN_FILENO); dup2(fd, STDOUT_FILENO); dup2(fd, STDERR_FILENO); if (fd > 2) - close(fd); + __close(fd); } return(0); } |