Files
AnyPS5/docs/dev/debt
Opensource55 dfc217b316 fix(libc): reopen a standard stream onto a directory on Windows
A guest that reopens `stdin`, `stdout` or `stderr` onto a directory in a read mode threw instead of
returning the stream, while the console answers that a directory opens in a read mode and the
debt entry already recorded the throw as the Windows difference.

The standard stream now goes through the same descriptor move a regular file uses: the directory
descriptor is opened, moved onto the standard descriptor, and libkernel's directory entry follows
it, so `fstat` of the guest descriptor reports a directory and the first read answers `EISDIR` with
the error indicator set, like every other directory stream. A failed open restores the previous
standard target.

`guest_freopen_host_standard` reopens `stdout` onto a directory, asserts `S_IFDIR` on the guest
descriptor, asserts the first read answers `EISDIR`, then reopens the same stream on a file path
and writes through it.
2026-11-06 01:09:06 +08:00
..
…
2026-11-06 04:40:14 +13:00
…
2026-11-05 21:52:51 +13:00
2026-11-05 21:52:51 +13:00