summaryrefslogtreecommitdiffstats
path: root/libc
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-01-11 13:30:41 +0000
committerEric Andersen <andersen@codepoet.org>2002-01-11 13:30:41 +0000
commiteba513e5693349e4f339b4162abe1fa784705aee (patch)
tree1d7a901eaefa75d3d94b33adebcc7ec9707c20df /libc
parent6a461519b91a521a98e0be1bf272bcdac48c6f7e (diff)
downloaduClibc-alpine-eba513e5693349e4f339b4162abe1fa784705aee.tar.bz2
uClibc-alpine-eba513e5693349e4f339b4162abe1fa784705aee.tar.xz
Fix indenting
Diffstat (limited to 'libc')
-rw-r--r--libc/unistd/daemon.c42
1 files 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);
}