#20 Failure checking of ectags broken

current_cvs
closed-works-for-me
5
2001-10-24
2001-10-16
No

In Generic.pm exuberant-ctags is opened as a pipe with
open().
The the return value of open is checked, but this only
checks if
the fork creating the process was successful. If there
is no
ectags installed or if the invocation went wong no
sensible
error message is displayed. The return value of the
process
should be checked more carefully.

Discussion

  • Malcolm Box
    Malcolm Box
    2001-10-18

    Logged In: YES
    user_id=215386

    The implicit fork version of open is "|-" which we don't
    use, we use the straight pipe open. Testing this with

    open X, "/usr/bin/not_there" or die "Failed";

    reliably prints "Failed" rather than having the fork
    succeed.

    According to perldoc -f open, there is no more information
    in the return value of open() that we could check - it's
    undefined if it failed, non-zero (and the pid of the child)
    if it succeeded.

     
  • Malcolm Box
    Malcolm Box
    2001-10-24

    • status: open --> closed-works-for-me