From cfaa2a09554c68a8fc6a8abaea3506ea923366ec Mon Sep 17 00:00:00 2001 From: Hajimu UMEMOTO Date: Thu, 19 Jun 2014 11:49:36 +0000 Subject: [PATCH] Use SOCK_CLOEXEC. MFC after: 1 week --- lib/libc/net/getaddrinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index 9b5954b853e7..22b41033d4c5 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1589,7 +1589,7 @@ is_ifdisabled(char *name) struct in6_ndireq nd; int fd; - if ((fd = _socket(AF_INET6, SOCK_DGRAM, 0)) < 0) + if ((fd = _socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, 0)) < 0) return -1; memset(&nd, 0, sizeof(nd)); strlcpy(nd.ifname, name, sizeof(nd.ifname));