summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/fts.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/fts.c b/lib/fts.c
index eb24b9862..d119541ef 100644
--- a/lib/fts.c
+++ b/lib/fts.c
@@ -203,10 +203,7 @@ static int
internal_function
diropen (char const *dir)
{
- int fd = open (dir, O_RDONLY | O_DIRECTORY);
- if (fd < 0)
- fd = open (dir, O_WRONLY | O_DIRECTORY);
- return fd;
+ return open (dir, O_RDONLY | O_DIRECTORY | O_NOCTTY | O_NONBLOCK);
}
FTS *