fix(libkernel): fail a write to a pipe with no reader with EPIPE on Windows #5326
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5326"
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 Kikoarl on 2026-10-13T17:18:04Z.
What
On Windows, the UCRT maps
ERROR_NO_DATA(232), whichWriteFilereports for a pipe whose read end has been closed, toEINVAL. FreeBSD 11.4pipe_writereturnsEPIPE.Remap
ERROR_NO_DATAwithEINVALtoEPIPEinNativeWrite(File/src/Open.cpp) andTransferIovecs(File/src/Stdio.cpp), sowrite,writev,sceKernelWriteandsceKernelWritevreturnEPIPE(0x80020020) when writing to a broken pipe.Closes #5246
Tested
/tmp/anyps5_build).ctest -R guest_pipe_closed_write: verifies broken pipe writes on blocking and non-blocking pipes for scalar and vector writes.ctest -R "guest_file_vector|guest_kernel_fcntl|guest_dup".python3 tools/check_conventions.py.Checklist
python3 tools/check_conventions.pydocs/dev/TechnicalDebt.md(if applicable)Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T17:24:05Z.
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.
main)core/libs/prx/libkernel/CMakeLists.txtL1212core/libs/prx/libkernel/File/src/Stdio.cppL1011core/libs/tests/GuestPipeClosedWrite.cppImported from boykopovar/AnyPS5. Originally posted by Kikoarl on 2026-10-13T17:38:36Z.
Closing in favor of earlier carry in #5265.
Pull request closed