From d2eb50cd0ca5fb81f2abdfd917bf5c0ce0fe9ac7 Mon Sep 17 00:00:00 2001 From: jilles Date: Fri, 23 Aug 2013 13:59:47 +0000 Subject: libc: Make various internal file descriptors from fopen() close-on-exec. --- lib/libc/resolv/res_query.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/libc/resolv/res_query.c') diff --git a/lib/libc/resolv/res_query.c b/lib/libc/resolv/res_query.c index 746a2be..854909c 100644 --- a/lib/libc/resolv/res_query.c +++ b/lib/libc/resolv/res_query.c @@ -457,7 +457,7 @@ res_hostalias(const res_state statp, const char *name, char *dst, size_t siz) { if (issetugid()) return (NULL); file = getenv("HOSTALIASES"); - if (file == NULL || (fp = fopen(file, "r")) == NULL) + if (file == NULL || (fp = fopen(file, "re")) == NULL) return (NULL); setbuf(fp, NULL); buf[sizeof(buf) - 1] = '\0'; -- cgit v1.1