fix(libc): propagate file position errors #314
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/314"
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 RomainROCH on 2026-10-02T04:18:01Z.
What
Return failure from fgetpos when ftello cannot obtain a position. Preserve the caller's output on failure and retain the existing errno mapping.
The regression checks a regular file and an unavailable position. Linux uses a non-seekable pipe. Windows closes the underlying OS pipe handle because its CRT can report a position for a valid pipe; the FILE object remains allocated until cleanup. The fixture verifies ftello actually fails before checking fgetpos, errno and the unchanged output.
Tested
99fbcf0377.Checklist
main; no other open PR implements the same functions