From f2d08cf7558176af7ef36cf5b5213e676b02d7ac Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sat, 29 Sep 2012 17:59:50 -0400 Subject: fix some more O_CLOEXEC/SOCK_CLOEXEC issues --- src/misc/realpath.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc/realpath.c') 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); -- cgit v1.2.1