octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: wait_for_file ?? [who/what/where does fclose()?]


From: John W. Eaton
Subject: Re: wait_for_file ?? [who/what/where does fclose()?]
Date: Fri, 10 Sep 2010 15:26:31 -0400

On 10-Sep-2010, Michael D Godfrey wrote:

| Just because I am risk adverse, I would put an fflush() ahead of the fclose
| wherever
| it happens.  This seems to matter more when using NFS, and it has never been
| known
| to cause harm.

If you are using a filesystem mounted via NFS with the async option, I
think even fflush won't necessarily help you.  As I read the man page
for NFS, the async option allows NFS to immediately report that a
write operation has finished, even when the data has not actually been
written to the physical disk, so if another process tries to read the
same file, it can fail.

So, back to the question I asked yesterday:

  What were the specifics of the case(s) that were failing?  What types
  of systems, filesystems, etc.?  If it only occurred on network mounted
  filesystems that have the async option set, then I guess I'm not
  surprised by the failure.

  If the problem also happened on local filesystems, or NFS filesystems
  with the sync option set, then I'm not sure why it would happen, or
  how to avoid the problem.

I think we need to understand why the original failure that prompted
this discussion occurred.

An additional thought is that if these failures only happened on
network mounted filesystems that have the async option set, then I'm
not sure we should work too hard at tring to fix all the potential
problems that can occur with that option.  It's probably better to
recommend that people avoid using the option, or if they do and odd
failures happen, then it is not Octave's fault.

jwe



reply via email to

[Prev in Thread] Current Thread [Next in Thread]