On 03/18/2015 01:04 PM, Eli Zaretskii wrote:
In this case, "work" means make that file descriptor become valid
again.  IOW, it should emulate what happens on Posix systems when
opendir is called: a new file descriptor is allocated.

Many POSIX systems do that, but POSIX doesn't require it and that's why POSIX lets dirfd return -1 and set errno=ENOTSUP. For example, a POSIX opendir implementation can read the entire directory into RAM and close the file descriptor before returning (not that I'd recommend this for large directories....).

Reply via email to