diff --git a/libc/src/dirent.cpp b/libc/src/dirent.cpp index c58256f9..1731fdca 100644 --- a/libc/src/dirent.cpp +++ b/libc/src/dirent.cpp @@ -20,6 +20,8 @@ extern "C" return nullptr; } + fcntl(fd, F_SETFD, FD_CLOEXEC); + dp->_fd = fd; return dp;