* lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
* modules/fts (Depends-on): Add 'open'.
+2020-05-28 Bruno Haible <bruno@clisp.org>
+
+ fts: Make more robust in multithreaded applications.
+ * lib/fts.c (fts_open): Pass an O_CLOEXEC flag to open().
+ * modules/fts (Depends-on): Add 'open'.
+
2020-05-28 Bruno Haible <bruno@clisp.org>
relocatable-prog: Make more robust in multithreaded applications.
early, doing it here saves us the trouble of ensuring
later (where it'd be messier) that "." can in fact
be opened. If not, revert to FTS_NOCHDIR mode. */
- int fd = open (".", O_SEARCH);
+ int fd = open (".", O_SEARCH | O_CLOEXEC);
if (fd < 0)
{
/* Even if "." is unreadable, don't revert to FTS_NOCHDIR mode
i-ring
lstat
memmove
+open
openat-h
opendir
opendirat