Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signal readdir() errors by clearing/setting errno
At least for Linux, distinguishing an error from the end of the directory listing is done by setting errno to 0 and then calling readdir(). Errno will then be set in the case of an error. https://linux.die.net/man/3/readdir This adresses #17907 but unfortunately, there are no tests to (re)produce the behaviour at all. $! mirrors errno, so there also is added code in the example in perlfunc.pod how to check for an error condition.
- Loading branch information