From 228bf52b493e51fdca22335f93241912a402db20 Mon Sep 17 00:00:00 2001 From: Jonas 'Sortie' Termansen Date: Tue, 26 Aug 2014 23:13:18 +0200 Subject: [PATCH] Fix fdopen setting FD_CLOEXEC wrongly. --- libc/dirent/fdopendir.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libc/dirent/fdopendir.cpp b/libc/dirent/fdopendir.cpp index 329a5bcc..11e215ba 100644 --- a/libc/dirent/fdopendir.cpp +++ b/libc/dirent/fdopendir.cpp @@ -136,7 +136,7 @@ extern "C" DIR* fdopendir(int fd) int old_dflags = fcntl(fd, F_GETFD); if ( 0 <= old_dflags ) - fcntl(fd, F_SETFD, old_dflags | O_CLOEXEC); + fcntl(fd, F_SETFD, old_dflags | FD_CLOEXEC); info->fd = fd;