projects
/
platform
/
upstream
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
openvt,getty,vfork_daemon_rexec,mount: tighten up fd cleanup code
[platform/upstream/busybox.git]
/
util-linux
/
mount.c
diff --git
a/util-linux/mount.c
b/util-linux/mount.c
index
b3e8c47
..
77382ff
100644
(file)
--- a/
util-linux/mount.c
+++ b/
util-linux/mount.c
@@
-737,7
+737,7
@@
static int daemonize(void)
dup2(fd, 0);
dup2(fd, 1);
dup2(fd, 2);
-
if (fd > 2) close(fd
);
+
while (fd > 2) close(fd--
);
setsid();
openlog(applet_name, LOG_PID, LOG_DAEMON);
logmode = LOGMODE_SYSLOG;