git: eba403923626 - main - libc: set close-on-exec for temp socket used to detect IPv6 support
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 24 May 2025 13:17:28 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=eba403923626f2ecfd724e131da992a7c3cb7240
commit eba403923626f2ecfd724e131da992a7c3cb7240
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-05-24 11:27:29 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-05-24 13:17:09 +0000
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
---
lib/libc/gen/sysconf.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/libc/gen/sysconf.c b/lib/libc/gen/sysconf.c
index be42dd238b56..6a838ddd58d8 100644
--- a/lib/libc/gen/sysconf.c
+++ b/lib/libc/gen/sysconf.c
@@ -567,7 +567,7 @@ yesno:
case _SC_IPV6:
#if _POSIX_IPV6 == 0
sverrno = errno;
- value = _socket(PF_INET6, SOCK_DGRAM, 0);
+ value = _socket(PF_INET6, SOCK_CLOEXEC | SOCK_DGRAM, 0);
errno = sverrno;
if (value >= 0) {
_close(value);