Repository navigation
Conversation
FreeBSD closes the stream and keeps errno at EINVAL when freopen cannot parse the mode, with or without a path. The guest stream stayed open and the descriptor leaked.
freopen with an invalid mode threw on a stream that was already closed instead of returning null with EINVAL. The stream is now closed only once and the mode-only reopening limit is listed in the technical debt.
…d mode Only streams the guest opened itself are closed. stdin, stdout and stderr stay open and usable, and the difference from FreeBSD is listed in the technical debt.
|
Independent Windows validation by OpenAI Codex (AI-assisted); no code changes were made to this PR. On PR head
This was a focused Windows run of the two libc test targets, not a full build or full CTest suite. |
|
Thanks for the independent Windows run and repeated CTest results. That closes the platform-specific validation gap for the carried |
|
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. |
What
Carries the three reviewed commits from #5379, preserving Hussein Kadhim’s commit authorship. An invalid mode now closes and frees a guest-owned stream before returning
EINVAL; a previously closed stream also returnsEINVALwithout throwing. The standard streams remain open and usable, with the documented FreeBSD difference recorded indocs/dev/debt/libc.md.The branch is rebased on current
main. Itsfreopenchanges integrate cleanly with open PR #5033, which adds Windows delete sharing during successful reopen.Tested
Linux GCC 12.2, Ninja Release: built
guest_standard_stream_testsandfile_streams_tests; CTestguest_standard_streamsandfile_streamspassed (2/2). The issue author’s Windows invalid-mode, descriptor-leak, and valid-mode comparison checks are summarized in #5379 and were not rerun here.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repository