summaryrefslogtreecommitdiff
path: root/src/network/if_nameindex.c
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2013-07-09 00:40:17 -0400
committerRich Felker <dalias@aerifal.cx>2013-07-09 00:40:17 -0400
commit0716b10ac8dc167f96969c964974d4094035fed0 (patch)
tree176e7cfc3f34eeee3fc5d00130be0eadf5e07a43 /src/network/if_nameindex.c
parentca9aff6a1646c7fc106bfbb9399b3a1bcb14f18b (diff)
downloadmusl-0716b10ac8dc167f96969c964974d4094035fed0.tar.gz
fix missing SOCK_CLOEXEC in various functions that use sockets internally
Diffstat (limited to 'src/network/if_nameindex.c')
-rw-r--r--src/network/if_nameindex.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/network/if_nameindex.c b/src/network/if_nameindex.c
index cdb956cb..ad0a7662 100644
--- a/src/network/if_nameindex.c
+++ b/src/network/if_nameindex.c
@@ -47,7 +47,7 @@ struct if_nameindex *if_nameindex()
{
size_t n;
void *p = 0;
- int s = socket(AF_UNIX, SOCK_DGRAM, 0);
+ int s = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
if (s>=0) {
for (n=0; (p=do_nameindex(s, n)) == (void *)-1; n++);
__syscall(SYS_close, s);