Email List: Xaustin-review-lX
[All Lists]

Defect in XCU find

To: yyyyyyyyyyyyyyy@xxxxxxxxxxxxx
Subject: Defect in XCU find
From: Geoff Clare <yyy@xxxxxxxxxxxxx>
Date: Fri, 12 Nov 2004 15:48:36 +0000
@ page 452 line 17520 section find objection [gwc find -L dangling link]

Problem:

Defect code :  3. Clarification required

It is not clear how find should behave when the -L option is used
and a dangling symbolic link is encountered.

The description of -L does not contain the following text which
appears in the description of -H:

    "If the referenced file does not exist, the file information and
    type shall be for the link itself."

The absence of this text would seem to imply that with -L, if the
referenced file does not exist then find should treat it as an
error.  (I.e. if stat() fails find with -L should not try an lstat()
to check whether it is a dangling symbolic link - it should just
behave the same as if the file does not exist at all.)

However, the rationale on the find page states:

    "Since the -L option resolves all symbolic links and the -type l
    primary is true for symbolic links that still exist after symbolic
    links have been resolved, the command:

    find -L . -type l

    prints a list of symbolic links reachable from the current
    directory that do not resolve to accessible files."

This implies that the intention was for the treatment of dangling
links with -L to be the same as with -H.

Action:

Either add the text "If the referenced file does not exist, the file
information and type shall be for the link itself" to the description
of the -L option, or correct the rationale.

<Prev in Thread] Current Thread [Next in Thread>