* lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
+2020-05-28 Bruno Haible <bruno@clisp.org>
+
+ openat: Make more robust in multithreaded applications.
+ * lib/openat.c (openat_needs_fchdir): Pass an O_CLOEXEC flag to open().
+
2020-05-28 Bruno Haible <bruno@clisp.org>
at-internal: Make more robust in multithreaded applications.
openat_needs_fchdir (void)
{
bool needs_fchdir = true;
- int fd = open ("/", O_SEARCH);
+ int fd = open ("/", O_SEARCH | O_CLOEXEC);
if (0 <= fd)
{