[bug #66135] loop: different error messages describe an identical (?) error

Jean-Baptiste de la Tour <[email protected]>
Newsgroups gmane.comp.gnu.findutils.bugs
Message-ID <[email protected]>
Follow-up Comment #3, bug #66135 (group findutils):

A broken symbolic link is not the same thing as a symbolic link loop.

A broken link cannot be dereferenced:

$ ln -s broken link
$ stat -L link
stat: cannot statx 'link': No such file or directory
$ 


However, contrary to what was said ("You can't dereference this link at all"),
a symbolic link loop CAN be dereferenced. And that's the problem, the
dereferencing never ends:

$ ln -s link link
$ stat -L link
stat: cannot statx 'link': Too many levels of symbolic links
$ 


Here, *stat* does dereference the symbolic link, but:
1. detecting the loop (the same way as *find* does)
2. decides to stop (the same way as *find* does)
3. generates an error (sometimes the same error message as *find* and
sometimes … NOT -- and that's the problem)
                                                                              
           
To conclude: As I stated in my original submission, a file system loop is a
file system loop; file system loop detection is file system loop detection.
* There are some command lines where the type of file system loop
(_link-to-link_ vs _link-to-directory-to-link_) matters.
	* Example: "stat -L" generates an error for _link-to-link_ loops and a normal
output for _link-to-directory-to-link_ loops.
* However, in situations where it generates an error message, it should return
the exact same error message (preferably the most useful one as explained in
my original submission).


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?66135>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc (application/pgp-signature, 228 B)
-----BEGIN PGP SIGNATURE-----

iHUEABYIAB0WIQQk97aszIMMAvLLwm6qLAuaBUf3TgUCZuGrvAAKCRCqLAuaBUf3
To58AQCBF3L4cxviOgs6WFgwC26A7aY4J6cyxffQVCRwIykU1AEA0X5ISLmMkR5v
Axfb2Dr2X4Vdw1grq+OHp3sG4MyDuw0=
=OeAa
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.