[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Fwd) ftw() not correctly handling symlinks
From: |
Michael Kerrisk |
Subject: |
Re: (Fwd) ftw() not correctly handling symlinks |
Date: |
Thu, 12 Jul 2001 10:34:05 +0200 |
> As for your report: you completely misunderstand the difference
> between ftw() and nftw(). Especially why there is nftw() in the first
> place.
I've been reading the standards pretty closely, though as I mentioned, it
seems to me that XSH:ftw() is not completely clear on this point (i.e.
whether or not ftw() should follow symlinks - the implication of a XBD
4.11 is that unless otherwise stated, it should, however the presence of
the FTW_SL flag for ftw() implies otherwise).
I tested the sample program I already sent you on OSF/1-5.1a - it gives
the reults I expected - i.e. symbolic links are NOT followed, and ftw()
passes FTW_SL to the helper function when it encounters a symlink.
So I think there is a question of who misunderstands the standards - you,
or me and the folk at Compaq/ex-Digital (and I'm quite prepared to allow
it could be the latter - like I say, it ain't clear)
Here's a simple way to resolve the point: In what circumstances (if any)
will/should glibc:ftw() pass FTW_SL as a value to flag?
Michael
__________________________________________
Michael Kerrisk
mailto: address@hidden
It is good to collect things, but it is better to go on walks
Anatole France