From 1498fdb7b0e10025a7de3e8e6dfb056927dfbb70 Mon Sep 17 00:00:00 2001 From: Andrew Chambers Date: Thu, 7 May 2020 20:44:04 +1200 Subject: [PATCH] Tweak comment, remove extra include. --- src/core/io.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/core/io.c b/src/core/io.c index fc984d29..97b205e3 100644 --- a/src/core/io.c +++ b/src/core/io.c @@ -33,7 +33,6 @@ #include #include #include -#include #endif static int cfun_io_gc(void *p, size_t len); @@ -143,10 +142,9 @@ static Janet cfun_io_temp(int32_t argc, Janet *argv) { #ifndef JANET_WINDOWS /* It seems highly unlikely a typical janet user wants a tempfile to be inherited and - libc tmpfile does NOT set O_CLOEXEC by default, + libc tmpfile does NOT set O_CLOEXEC by default. - Even though setting this flag after a delay is racy in threaded programs, - It helps in single threaded ones. The fix for threaded programs would be to use mkostemp + For threaded programs we should use mkostemp which is coming to POSIX at a later time. */ if (fcntl(fileno(tmp), F_SETFD, FD_CLOEXEC) != 0) { fclose(tmp);