From eba513e5693349e4f339b4162abe1fa784705aee Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 11 Jan 2002 13:30:41 +0000 Subject: Fix indenting --- libc/unistd/daemon.c | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/libc/unistd/daemon.c b/libc/unistd/daemon.c index 0cd827519..bfad7a363 100644 --- a/libc/unistd/daemon.c +++ b/libc/unistd/daemon.c @@ -34,31 +34,31 @@ int daemon( int nochdir, int noclose ) { - int fd; + int fd; - switch (fork()) { - case -1: - return(-1); - case 0: - break; - default: - _exit(0); - } + switch (fork()) { + case -1: + return(-1); + case 0: + break; + default: + _exit(0); + } - if (setsid() == -1) - return(-1); + if (setsid() == -1) + return(-1); - if (!nochdir) - chdir("/"); + if (!nochdir) + chdir("/"); - 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); - } - return(0); + 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); + } + return(0); } -- cgit v1.2.3