From: Alan Cox Date: Thu, 21 May 2015 22:08:47 +0000 (+0100) Subject: opendir: standard says O_CLOEXEC X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=59e209c855e42398c1fd28b10db7681d33ee19bc;p=FUZIX.git opendir: standard says O_CLOEXEC --- diff --git a/Library/libs/opendir.c b/Library/libs/opendir.c index d9f542b7..3c9f8c57 100644 --- a/Library/libs/opendir.c +++ b/Library/libs/opendir.c @@ -26,7 +26,7 @@ DIR *opendir(char *path) errno = ENOMEM; goto Err; } - if ((dir->dd_fd = open(path, O_RDONLY)) < 0) { + if ((dir->dd_fd = open(path, O_RDONLY | O_CLOEXEC)) < 0) { free(dir->dd_buf); free(dir); Err:return NULL;