* lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
open().
+2020-05-28 Bruno Haible <bruno@clisp.org>
+
+ at-internal: Make more robust in multithreaded applications.
+ * lib/openat-proc.c (openat_proc_name): Pass an O_CLOEXEC flag to
+ open().
+
2020-05-28 Bruno Haible <bruno@clisp.org>
mountlist: Make more robust in multithreaded applications.
problem is exhibited on code that built on Solaris 8 and
running on Solaris 10. */
- int proc_self_fd = open ("/proc/self/fd",
- O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
+ int proc_self_fd =
+ open ("/proc/self/fd",
+ O_SEARCH | O_DIRECTORY | O_NOCTTY | O_NONBLOCK | O_CLOEXEC);
if (proc_self_fd < 0)
proc_status = -1;
else