From ad8ac1bd6a3db5becaf1dc20394f6e682d7828cc Mon Sep 17 00:00:00 2001 From: Ross Lagerwall Date: Sat, 17 Dec 2011 14:43:40 -0500 Subject: Open /etc/resolv.conf with FD_CLOEXEC --- resolv/res_init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'resolv') diff --git a/resolv/res_init.c b/resolv/res_init.c index 73caaa4c5e..c58c763841 100644 --- a/resolv/res_init.c +++ b/resolv/res_init.c @@ -233,7 +233,7 @@ __res_vinit(res_state statp, int preinit) { (line[sizeof(name) - 1] == ' ' || \ line[sizeof(name) - 1] == '\t')) - if ((fp = fopen(_PATH_RESCONF, "rc")) != NULL) { + if ((fp = fopen(_PATH_RESCONF, "rce")) != NULL) { /* No threads use this stream. */ __fsetlocking (fp, FSETLOCKING_BYCALLER); /* read the config file */ -- cgit v1.2.3