This is the mail archive of the guile@cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: (seeks while reading) Re: Performance, argh


Ken Raeburn wrote:
> 
> Maciej Stachowiak <mstachow@alum.mit.edu> writes:
> 
> > * Many files are access'd and then stat'd, or vice versa. The
> >   duplication should be investigated and removed (if `load' is trying
> >   to do an access() or a stat() before open()ing the file that is
> >   bogus, it should just do the open and check for an error return).
> 
> If practical.  Be aware that there are some file systems that
> implement access-control schemes where you can't predict your 
> access rights from the stat() data. 

Yeh but he wasn't suggesting to calculate from the stat data, but rather
to do an open() and check for error, which by definition must be
correct.

>  And on some systems you can open() a directory.  (I don't know 
> if that's common any more; I think it used to be.)

No more dangerous than opening any other bogus file.

-- 
Chris Bitmead
mailto:chris@tech.com.au

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]