aboutsummaryrefslogtreecommitdiff
path: root/lib/dirtree.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/dirtree.c')
-rw-r--r--lib/dirtree.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dirtree.c b/lib/dirtree.c
index 85b1a3cf..7ad699e1 100644
--- a/lib/dirtree.c
+++ b/lib/dirtree.c
@@ -115,7 +115,7 @@ struct dirtree *dirtree_handle_callback(struct dirtree *new,
if (dir) {
if (flags & (DIRTREE_RECURSE|DIRTREE_COMEAGAIN)) {
- new->data = openat(dirtree_parentfd(new), new->name, 0);
+ new->data = openat(dirtree_parentfd(new), new->name, O_CLOEXEC);
dirtree_recurse(new, callback, flags & DIRTREE_SYMFOLLOW);
if (flags & DIRTREE_COMEAGAIN) flags = callback(new);
}