[EMAIL PROTECTED] wrote:
>
>
> >I did propose a pathconf() call to retrieve directory "hardlink" semantics
> >some time ago on the POSIX mailing list as this is the only way to do it
> >right.
>
>
> When you encounter a spurious hardlink to a directory, you can typically
> tell that you do (.. != where you came from).
I am not sure whether you understand the problem, I am talking about a
pathconf call that tells me whether the non-dir-hardlink case gives you
dir-nlink == 2 + number-of-subdirs. This can be checked very efficiently
from the open dir fd.
> Then it might be prudent not to traverse it.
>
> (For rm, we now check that the current incantation isn't isn't a parent
> directory of itself)
I am not sure whether "rm" is correct, Sun's find has been wrong the last time
I checked and this is the reason I did write sfind. Sfind is able to correctly
traverse a directory tree even if there are hardlinked directories and even if
the path gets ininitely long.
Jörg
--
EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
[EMAIL PROTECTED] (uni)
[EMAIL PROTECTED] (work) Blog: http://schily.blogspot.com/
URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-discuss mailing list
[email protected]