bxwllzz 601efab4be Fix EINTR handling in read() and readdir() loops
- 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.
2025-12-27 18:22:59 +08:00
..
ghc Fix EINTR handling in read() and readdir() loops 2025-12-27 18:22:59 +08:00