From: Eric Andersen Date: Mon, 30 Sep 2002 20:08:53 +0000 (-0000) Subject: Set the close-on-exec flag, just to be saf X-Git-Tag: 0_60_5~48 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6a9799020b2d5f60183e352f0baf5c185da616c4;p=oweals%2Fbusybox.git Set the close-on-exec flag, just to be saf --- 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)) {