Global: add missing O_CLOEXEC to open()

This commit is contained in:
apocelipes
2025-06-19 18:11:54 +08:00
committed by Carter Li
parent 68fd21d0e4
commit 3291a9945f
17 changed files with 26 additions and 26 deletions
+1 -1
View File
@@ -63,7 +63,7 @@ const char* ffBinaryExtractStrings(const char* elfFile, bool (*cb)(const char* s
return "load libelf failed";
// Open the ELF file
FF_AUTO_CLOSE_FD int fd = open(elfFile, O_RDONLY, 0);
FF_AUTO_CLOSE_FD int fd = open(elfFile, O_RDONLY | O_CLOEXEC, 0);
if (fd < 0) return "open() failed";
Elf* elf = elfData.ffelf_begin(fd, ELF_C_READ, NULL);