perror(3) considered harmful
    Dave Decot 
    decot at cwruecmp.UUCP
       
    Thu Mar  1 20:43:42 AEST 1984
    
    
  
Why does csh give the message
    % foo
    foo: Command not found.
when foo is an executable (by me) shell file on my path?
Because the first line of foo says
    #! csh -f
And, of course, "csh" is not a full pathname (why does it have to be!?),
so poor exec*(2) can't find it.
What I want to know is, why in blazes doesn't somebody tell me that 
*csh* is the "Command not found" and not my innocent (at least "found")
shell file?
And why do protected directories refuse to acknoledge that they exist
when I try to cd to them?  I can find out the name and that it is indeed
a directory by doing ls(1), so I keep checking my spelling and doing pwd's
and all sorts of things when the real problem is that the message
    % pwd
    /usr
    % cd src
    src: No such file or directory.
is simply WRONG.  And who said ANYTHING about a file?  If the kernel
can't give more accurate messages, perror shouldn't be used.
Dave Decot		 "Programmers are people, too."
decvax!cwruecmp!decot    (Decot.Case at rand-relay)
    
    
More information about the Comp.unix
mailing list