On Fri, 6 Nov 1998, Kyle Jones wrote:
> > Fix #2: Change order of close and stat
>
> This would seem to be the correct solution. On other systems it should
> not make any difference. The only thing is, why wasn't it done before?
stat() is relatively expensive compared to fstat(). Also, it
is surprising (to me) that close() would fiddle with the file
modtime, given that close() does no implicit flushing of data.
I seem to remember somewhere that NFS writes may be postponed until
close(). That is, close() may give errors such as disk full, etc, because
for performance reasons, write() is only done locally and disk allocation
is not done until close [or a later write].
-Justin
vallon(a)mindspring.com