summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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)) {