> > I'm very reluctant to try opening every file in the
> > filesystem just in case it turns out to be a directory we need to
> > descend into.
>
> Your reluctance is understandable, since it is incorrect to
> always open every directory entry. The corresponding file
> might be a special file, an
"James Youngman" <[EMAIL PROTECTED]> writes:
> I'm very reluctant to try opening every file in the
> filesystem just in case it turns out to be a directory we need to
> descend into.
Your reluctance is understandable, since it is incorrect to
always open every directory entry. The corresponding
On 10/7/06, Miklos Szeredi <[EMAIL PROTECTED]> wrote:
> Yes, for systems with O_NOFOLLOW, that is a perfect (efficient, race
> free) solution. For systems without O_NOFOLLOW, just moving the
> lstat() and the open() close to each other
Actually moving the lstat() _after_ the open() totally remo