Repository navigation
feat(libkernel): accept MSG_WAITALL in recv, recvfrom and recvmsg on a stream socket - #8474
Merged
Merged
Conversation
…a stream socket soreceive_generic keeps a MSG_WAITALL receive on a stream socket waiting until the buffer is full, the peer closes or an error occurs. The three calls failed every flag but MSG_PEEK and MSG_DONTWAIT with EOPNOTSUPP. A stream socket now passes the flag to the host receive; a datagram socket ignores it, as a record is delivered whole. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
12 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
12 tasks done
Merged
12 tasks done
This was referenced Oct 20, 2026
Merged
12 tasks done
Collaborator
|
Checked the flag path against FreeBSD 11.4 |
12 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
recv,recvfromandrecvmsgfailed every flag butMSG_PEEKandMSG_DONTWAITwithEOPNOTSUPP. FreeBSD 11.4 acceptsMSG_WAITALL(0x40) and, on a stream socket, keeps the receive waiting until the buffer is full, the peer closes or an error occurs (soreceive_generic). A stream socket now passes the flag to the host receive (MSG_WAITALLon Winsock and Linux); a datagram socket ignores it, as a record is delivered whole. The Technical debt entry says what is not measured: nonblocking sockets andMSG_WAITALL | MSG_PEEKfollow the host, andSO_RCVTIMEObounds only the wait for the first data.Fixes #8473
Overlap: #7090 (SCM_RIGHTS, open) also changes
recvmsg;git merge-treeof the two heads has two conflicts inUdp.cpp, so whichever lands second rebases.git merge-treeagainst #8392, #8448, #8463, #7511, #7502, #7485, #7850 and #7490 is clean.pr_overlapwas not run.Tested
Windows 10 (19045), MinGW-w64 GCC 15.2.0, Release, on upstream/main 44e3389 + this commit:
guest_tcp: the new case aborts without the change toUdp.cpp(recvwith0x40answersEOPNOTSUPP) and passes with it. It checks a 4+4 byte request split by 150 ms, a short result when the peer closes after 2 bytes (recvfrom), and a datagram socket that ignores the flag.guest_sce_net,guest_socket_error,guest_socket_options,guest_socket_timeouts,guest_udp,guest_poll,guest_socket_pairandguest_recvmsg_memorypass.python tools/check_conventions.py --base upstream/main: passes.recvmsgwithMSG_WAITALL(same flag path asrecvfrom, no dedicated case), a nonblocking socket.Checklist
main; no other open PR implements the same functions (feat(libkernel): pass descriptors in SCM_RIGHTS messages on Unix sockets #7090 changesrecvmsgfor SCM_RIGHTS).mdfiles or images added to the repositoryAI-assisted (Claude Code).
🤖 Generated with Claude Code