bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fdopendir closes the file descriptor on MinGW


From: Paul Eggert
Subject: Re: fdopendir closes the file descriptor on MinGW
Date: Wed, 18 Mar 2015 13:19:46 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

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

[Prev in Thread] Current Thread [Next in Thread]