summaryrefslogtreecommitdiff
path: root/choose.c
diff options
context:
space:
mode:
Diffstat (limited to 'choose.c')
-rw-r--r--choose.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/choose.c b/choose.c
index 6459b61..72f6bb1 100644
--- a/choose.c
+++ b/choose.c
@@ -98,6 +98,8 @@ GetSessionNames(int *count_ret, String **short_names_ret,
if ((dir = opendir (path)) == NULL)
return 0;
+ fcntl(dirfd(dir), F_SETFD, FD_CLOEXEC);
+
count = 0;
while ((entry = readdir (dir)) != NULL)