Set the close-on-exec flag, just to be saf

This commit is contained in:
Eric Andersen 2002-09-30 20:08:53 +00:00
parent e4d2a43951
commit 6a9799020b

View File

@ -232,6 +232,8 @@ static void message(int device, char *fmt, ...)
log_fd = -2; log_fd = -2;
fprintf(stderr, "Bummer, can't write to log on %s!\n", log); fprintf(stderr, "Bummer, can't write to log on %s!\n", log);
device = CONSOLE; device = CONSOLE;
} else {
fcntl(log_fd, F_SETFD, FD_CLOEXEC);
} }
} }
if ((device & LOG) && (log_fd >= 0)) { if ((device & LOG) && (log_fd >= 0)) {