libkernel: send/recv with MSG_DONTWAIT fail with EOPNOTSUPP on Windows #8185
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by xXPBSXx on 2026-10-20T01:52:02Z.
Repro
Windows host. Bound UDP socket, nothing queued:
recv(s, buf, n, 0x80)(alsorecvfrom,recvmsg,sendto/sendwith 0x80).Expected (FreeBSD 11.4
soreceive_generic/sosend_generic, sys/kern/uipc_socket.c, MSG_DONTWAIT): the call does not wait: EWOULDBLOCK (35) when nothing can be transferred.Actual: EOPNOTSUPP (45) on Windows (
GuestReceiveFlagsaccepts only MSG_PEEK there); Linux/macOS pass the flag to the host. Documented in docs/dev/debt/libkernel.md (MSG_DONTWAIT entry).Test:
core/libs/tests/GuestUdp.cpp,GuestSocketTimeouts.cpp(the Windows branches asserted EOPNOTSUPP; they now run the checks of the other hosts).Fix branch: https://github.com/xXPBSXx/AnyPS5/tree/fix/socket-dontwait-windows-fb
AI-assisted (Claude Code).