fix(libkernel): return EAGAIN for nonblocking vector pipe I/O on Windows #4885
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4885"
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 Buraddomoon on 2026-10-13T01:48:11Z.
What
Fixes #4874.
On Windows, vector reads from an empty nonblocking pipe return EINVAL and vector writes to a full one return ENOSPC. Normalize those CRT errors to EAGAIN in
NativeTransfer, using the same conditions as the existing scalarNativeReadandNativeWrite. This keeps the kernel result (0x80020023) and POSIX errno (35) consistent across scalar and vector I/O. The transfer is performed once; only its error is translated.Extend
guest_file_vectorto set both pipe ends nonblocking through the guestfcntlon both platforms. Check the kernel and POSIX read/write errors, zero-length operations, exact byte counts after draining, subsequent transfers, switching back to blocking, and EOF after closing the writer. The investigation and existing scalar-error mapping were identified by DavidSamir in #4874; this PR adds the implementation and regression coverage on currentmain.#4864 fixes a separate pipe-read buffering issue in the same files. Its changes were inspected, and the official overlap checker reports no overlap with open PRs; neither PR depends on the other.
Tested
Windows 10 22H2 (10.0.19045), WinLibs MinGW-w64 GCC 15.2.0 r7 (UCRT, POSIX, SEH), Release,
BUILD_TESTING=ON.guest_file_vectorfails at the empty nonblocking pipe's kernel read check onmaind1fd9372b.guest_file_vector,guest_filesystem,guest_poll,guest_dup,guest_standard_streams,file_streams,guest_aioandguest_kernel_fcntlpass three consecutive runs each (24 executions, no skips), repeated after rebasing ontomain0c3dc9ca2.cmake --build build --parallel 10succeeds, includinglibs, and succeeds again after the rebase.tools/check_conventions.py --base origin/main, including the PR title/body checks, andgit diff --check origin/main...HEADpass.tools/pr_overlap.py --repo boykopovar/AnyPS5 --branch HEADreports no overlap againstmain0c3dc9ca2.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T07:21:55Z.
I checked issue #4874 against current main. The ready David Samir branch cherry-picks cleanly onto
c2565f0; Linux Release/Ninjaguest_file_vector_testspluslibkernel.prxbuild succeeded andctest -R "^guest_file_vector$" --output-on-failurepassed (1/1). Conventions andgit diff --checkalso pass. Windows behavior remains supported by the issue author’s WinLibs 15.2.0 test report. I found no code overlap with #4864, which handles scattering already available pipe data.Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:36:49Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed