about summary refs log tree commit diff
path: root/elf
diff options
context:
space:
mode:
Diffstat (limited to 'elf')
-rw-r--r--elf/dl-load.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/elf/dl-load.c b/elf/dl-load.c
index 7d7008dd75..e8d0401f24 100644
--- a/elf/dl-load.c
+++ b/elf/dl-load.c
@@ -1706,7 +1706,7 @@ open_verify (const char *name, struct filebuf *fbp, struct link_map *loader,
 #endif
 
   /* Open the file.  We always open files read-only.  */
-  int fd = __open (name, O_RDONLY);
+  int fd = __open (name, O_RDONLY | O_CLOEXEC);
   if (fd != -1)
     {
       ElfW(Ehdr) *ehdr;