Use SOCK_CLOEXEC.

MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2014-06-19 11:49:36 +00:00
parent 28b9e53b7d
commit cfaa2a0955

View File

@ -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));