diff options
author | Rich Felker <dalias@aerifal.cx> | 2013-07-09 00:40:17 -0400 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2013-07-09 00:40:17 -0400 |
commit | 0716b10ac8dc167f96969c964974d4094035fed0 (patch) | |
tree | 176e7cfc3f34eeee3fc5d00130be0eadf5e07a43 /src/network/getifaddrs.c | |
parent | ca9aff6a1646c7fc106bfbb9399b3a1bcb14f18b (diff) | |
download | musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.gz musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.bz2 musl-0716b10ac8dc167f96969c964974d4094035fed0.tar.xz musl-0716b10ac8dc167f96969c964974d4094035fed0.zip |
fix missing SOCK_CLOEXEC in various functions that use sockets internally
Diffstat (limited to 'src/network/getifaddrs.c')
-rw-r--r-- | src/network/getifaddrs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/getifaddrs.c b/src/network/getifaddrs.c index a4c31782..a14ac1b3 100644 --- a/src/network/getifaddrs.c +++ b/src/network/getifaddrs.c @@ -127,7 +127,7 @@ int getifaddrs(struct ifaddrs **ifap) } if_freenameindex(ii); - int sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_IP); + int sock = socket(PF_INET, SOCK_DGRAM|SOCK_CLOEXEC, IPPROTO_IP); if(sock == -1) goto err2; struct ifreq reqs[32]; /* arbitrary chosen boundary */ struct ifconf conf = {.ifc_len = sizeof reqs, .ifc_req = reqs}; |