From cc4d59e9cd0a54118dc0f0dc833539102a42ea4a Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Tue, 27 Dec 2005 07:55:03 +0000 Subject: [PATCH] (diropen): Don't bother trying to open directory for write access: POSIX says that must fail. --- lib/fts.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/fts.c b/lib/fts.c index eb24b9862c..d119541efe 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 * -- 2.47.3