From 6a9799020b2d5f60183e352f0baf5c185da616c4 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Mon, 30 Sep 2002 20:08:53 +0000 Subject: Set the close-on-exec flag, just to be saf --- init/init.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/init/init.c b/init/init.c index 989babff7..3b0a66a24 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)) { -- cgit v1.2.3