10-25-04 10:52 PM
"Janice" <no@mail.com> writes:
> I use ls -l to list a file which is a link. I got the following.
> /lib/terminfo.lnk -> ../share/terminfo
> If I use stat("/lib/terminfo.lnk",buf), I get errno=2, which means No such
> file or directory.
> What is the reason for this contradictory result?
There is no contradiction here. Your soft links could point anywhere.
E.g.
% ln -s /doesntexist/doesntexist a
% ls -lgo a
lrwxrwxrwx 1 24 Oct 25 12:35 a -> /doesntexist/doesntexist
stat() call follows the link (lstat() doesn't). Does /share/terminfo exist
on your system?
Bye, Dragan
--
Dragan Cvetkovic,
To be or not to be is true. G. Boole No it isn't. L. E. J. Brouwer
!!! Sender/From address is bogus. Use reply-to one !!!
[ Post a follow-up to this message ]
|