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 <vegorov@google.com>
Commit-Queue: Slava Egorov <vegorov@google.com>
This commit is contained in:
netliomax25-code
2026-05-04 03:06:48 -07:00
committed by dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent 7ef5f0e641
commit f2cbaf6ed1
+1 -1
View File
@@ -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)) {