Skip to content

Commit eba4039

Browse files
committed
libc: set close-on-exec for temp socket used to detect IPv6 support
Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D50509
1 parent 9137de9 commit eba4039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/libc/gen/sysconf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ sysconf(int name)
567567
case _SC_IPV6:
568568
#if _POSIX_IPV6 == 0
569569
sverrno = errno;
570-
value = _socket(PF_INET6, SOCK_DGRAM, 0);
570+
value = _socket(PF_INET6, SOCK_CLOEXEC | SOCK_DGRAM, 0);
571571
errno = sverrno;
572572
if (value >= 0) {
573573
_close(value);

0 commit comments

Comments
 (0)