mirror of
https://github.com/gulrak/filesystem.git
synced 2026-01-01 03:12:08 +08:00
- read(): POSIX specifies that errno is undefined when read() return values are >= 0. The previous retry logic had bugs: When read() returns 0 (EOF), the loop condition checked errno before the return value. Since errno might be stale from a previous call, this could trigger a false retry on EOF. - readdir(): When readdir() reaches the end of directory, it returns NULL without modifying errno. Setting errno=0 before the loop caused an infinite loop. |
||
|---|---|---|
| .. | ||
| ghc | ||