From f2cbaf6ed1423ff47bf0064cc84d7d2b124d0584 Mon Sep 17 00:00:00 2001 From: netliomax25-code Date: Mon, 4 May 2026 03:06:48 -0700 Subject: [PATCH] missing MSG_CMSG_CLOEXEC flag in ReceiveMessage Closes https://github.com/dart-lang/sdk/pull/63305 GitOrigin-RevId: 0bd3a9d0c65aa4eba705e1eb48256bb1b441dc37 Change-Id: I6e009f7f9d59a0f9c01efe4607921a73cbcb9662 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/500441 Reviewed-by: Slava Egorov Commit-Queue: Slava Egorov --- runtime/bin/socket_base_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/bin/socket_base_posix.cc b/runtime/bin/socket_base_posix.cc index 629c307d1d6..7487a18c68b 100644 --- a/runtime/bin/socket_base_posix.cc +++ b/runtime/bin/socket_base_posix.cc @@ -127,7 +127,7 @@ intptr_t SocketBase::ReceiveMessage(intptr_t fd, int flags = 0; #ifdef MSG_CMSG_CLOEXEC // MSG_CMSG_CLOEXEC is not supported on macOS. - flags &= MSG_CMSG_CLOEXEC; + flags |= MSG_CMSG_CLOEXEC; #endif ssize_t read_bytes = TEMP_FAILURE_RETRY(recvmsg(fd, &msg, flags)); if ((sync == kAsync) && (read_bytes == -1) && (errno == EWOULDBLOCK)) {