PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs323] Clarification on use of stat() vs lstat()
Date: Wednesday, 16 Sep 2020, 19:10:33


    > Message Posted By: Unknown
    >
    > In a previous response, you stated:
    > >
    > >
    > >     > if stat() fails, do we always check lstat()? ...
    > >
    > > No.  For example,
    > >
    > >   % fiend nonexistent-file
    >
    > In this example you gave, since the default option is "-P", why would
    > stat() be called on the file in this case?  Is there a reason to call
    > stat() instead of lstat() when the "-P" option is specified?

No, but that is how my code works (it saved 2 lines).

--Stan-
PREV INDEX NEXT