commit | f73183f1a34df22b62a3d0bbf82e18d5797c9cde | [log] [tgz] |
---|---|---|
author | Elliott Hughes <enh@google.com> | Tue Aug 26 16:20:59 2014 -0700 |
committer | Elliott Hughes <enh@google.com> | Tue Aug 26 16:20:59 2014 -0700 |
tree | 1bc3c9a47180aaeb2f734e835034a3f6b9ac9d00 | |
parent | 7b87d441b0f2aa3ad5021ab6bd879a995a1bc2ce [diff] [blame] |
More cases where libc should use O_CLOEXEC. Change-Id: Idfa111aeebc5deca2399dae919e8b72eb54c23c0
diff --git a/libc/bionic/dirent.cpp b/libc/bionic/dirent.cpp index 7abc7f3..5e1c7a5 100644 --- a/libc/bionic/dirent.cpp +++ b/libc/bionic/dirent.cpp
@@ -78,7 +78,7 @@ } DIR* opendir(const char* path) { - int fd = open(path, O_RDONLY | O_DIRECTORY); + int fd = open(path, O_CLOEXEC | O_DIRECTORY | O_RDONLY); return (fd != -1) ? __allocate_DIR(fd) : NULL; }