scsh-users
[Top] [All Lists]

Re: file-readable?

To: Bruno.Verlyck@inria.fr
Subject: Re: file-readable?
From: Scott Schwartz <schwartz@galapagos.cse.psu.edu>
Date: Fri, 19 May 1995 12:54:31 -0400
Cc: scsh-bugs@martigny.ai.mit.edu
In Unix, the right way to see if a file is readable is to open() it for
reading and check the return value.  Even assuming only UFS, a stat
followed by an open is wrong because it introduces a race condition.

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