summaryrefslogtreecommitdiff
path: root/init/init.c
diff options
context:
space:
mode:
authorEric Andersen2002-09-30 20:08:53 +0000
committerEric Andersen2002-09-30 20:08:53 +0000
commit6a9799020b2d5f60183e352f0baf5c185da616c4 (patch)
tree67dc2766662bc3849c6fb98e655b79e617b424e7 /init/init.c
parente4d2a43951a2610925e43e9081f4b1027e94aa2c (diff)
downloadbusybox-6a9799020b2d5f60183e352f0baf5c185da616c4.zip
busybox-6a9799020b2d5f60183e352f0baf5c185da616c4.tar.gz
Set the close-on-exec flag, just to be saf
Diffstat (limited to 'init/init.c')
-rw-r--r--init/init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/init/init.c b/init/init.c
index 989babf..3b0a66a 100644
--- a/init/init.c
+++ b/init/init.c
@@ -232,6 +232,8 @@ static void message(int device, char *fmt, ...)
log_fd = -2;
fprintf(stderr, "Bummer, can't write to log on %s!\n", log);
device = CONSOLE;
+ } else {
+ fcntl(log_fd, F_SETFD, FD_CLOEXEC);
}
}
if ((device & LOG) && (log_fd >= 0)) {