X-Git-Url: http://nsz.repo.hu/git/?p=musl;a=blobdiff_plain;f=src%2Fmisc%2Frealpath.c;h=183351462519b99912265da7a87a11489dd8f1b9;hp=5756817943c208c66723f375c606451e7fe400f1;hb=f2d08cf7558176af7ef36cf5b5213e676b02d7ac;hpb=400c5e5c8307a2ebe44ef1f203f5a15669f20347 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);