libc: Set the close-on-exec flag for directories opened using opendir()
This is apparently mandated by POSIX.
This commit is contained in:
parent
3598dacbed
commit
d01087362e
@ -20,6 +20,8 @@ extern "C"
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fcntl(fd, F_SETFD, FD_CLOEXEC);
|
||||||
|
|
||||||
dp->_fd = fd;
|
dp->_fd = fd;
|
||||||
|
|
||||||
return dp;
|
return dp;
|
||||||
|
Loading…
Reference in New Issue
Block a user