Repository navigation
fix(libkernel): fail a write to a pipe with no reader with EPIPE on Windows - #5294
Closed
ErenYeager1836 wants to merge 1 commit into
Closed
ErenYeager1836 wants to merge 1 commit into
ErenYeager1836 wants to merge 1 commit into
Conversation
…indows The UCRT maps ERROR_NO_DATA, which WriteFile reports for a pipe whose read end is closed, to EINVAL. write, writev, sceKernelWrite and sceKernelWritev returned EINVAL where FreeBSD's pipe_write returns EPIPE.
This was referenced Oct 13, 2026
|
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.
|
Contributor
Author
|
Closing as duplicate of #5265, which carries the same change and was opened earlier. |
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
On Windows, the UCRT maps
ERROR_NO_DATA(reported byWriteFilewhen writing to a pipe whose read end has closed) toEINVAL. Consequently,write,writev,sceKernelWriteandsceKernelWritevreturnedEINVALinstead of FreeBSD's expectedEPIPE(32, or SCE error0x80020020).NativeWriteandTransferIovecs, mapsEINVALwith_doserrno == ERROR_NO_DATAon pipes toEPIPE.guest_pipe_closed_writecoveringwrite,writev,sceKernelWriteandsceKernelWritevon closed blocking and non-blocking pipes.Carried from @husseinkad with author attribution preserved.
Tested
guest_pipe_closed_writetest suite added to ctest. Passes conventions check.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)