musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src/misc/realpath.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/misc/realpath.c')
-rw-r--r--src/misc/realpath.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/realpath.c b/src/misc/realpath.c
index 57568179..18335146 100644
--- a/src/misc/realpath.c
+++ b/src/misc/realpath.c
@@ -19,7 +19,7 @@ char *realpath(const char *restrict filename, char *restrict resolved)
return 0;
}
- fd = open(filename, O_RDONLY|O_NONBLOCK);
+ fd = open(filename, O_RDONLY|O_NONBLOCK|O_CLOEXEC);
if (fd < 0) return 0;
snprintf(buf, sizeof buf, "/proc/self/fd/%d", fd);
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月03日 22:22:34 +0000

AltStyle によって変換されたページ (->オリジナル) /