projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
implement inet_lnaof, inet_netof, and inet_makeaddr
[musl]
/
src
/
misc
/
realpath.c
diff --git
a/src/misc/realpath.c
b/src/misc/realpath.c
index
5756817
..
1833514
100644
(file)
--- 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;
}
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);
if (fd < 0) return 0;
snprintf(buf, sizeof buf, "/proc/self/fd/%d", fd);