delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/01/23/14:00:49

From: xyzzy AT snafu DOT fubar (Roger)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: access() in DJGPP and TC/BC
Date: Fri, 23 Jan 1998 18:19:29 GMT
Message-ID: <34c86442.2868782@news.dircon.co.uk>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 980122184414 DOT 1427K-100000 AT is>
MIME-Version: 1.0
NNTP-Posting-Host: 194.112.52.20
Lines: 18
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

On Thu, 22 Jan 1998 18:44:34 +0200 (IST), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:

>        On Unix, `access' doesn't predict well the actual
>accessability of files, since it doesn't use the effective user id
>(it's a long story).  This makes `access' very non-portable.  In
>addition, it is very expensive on some systems.
>
>For those reasons, I would suggest to avoid `access' altogether and
>use `stat' instead.  `stat' is POSIX and is therefore much more
>portable, even to DOS compilers such as TC.

I have open in front of me "POSIX Programmer's Guide" page 213
which describes access(). Is the book is wrong?

access() and stat() are equally valid on a POSIX system.
-- 
Roger

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019