[Python-Dev] Re: RELEASED Python 2.3.1
Skip Montanaro
skip at pobox.com
Mon Sep 29 11:37:45 EDT 2003
Tim> [Martin v. Löwis]
>> As Guido explains, fsync is not necessary for that kind of
>> application on a POSIX system. Once write(2) has completed, all other
>> processes immediately see the changed data.
Tim> But we're not calling write(2) -- Python's file.write() (which my
Tim> little driver used, and also what ZODB uses) calls the buffered
Tim> fwrite.
Then shouldn't a file.flush() call be sufficient to force a call to write(2)
on POSIX systems?
Tim> Ignoring that, some systems aren't "pure". I note that, on my
Tim> Windows box, some Cygwin utilties "see" the hoped-for file sizes
Tim> while running my driver without the fsync under Cygwin Python, but
Tim> Windows utilities don't. I was using Cygwin 2.2.2; I don't know
Tim> whether 2.3.1 under Cygwin thinks fsync has gone missing.
It's been established that os.fsync() is required for Windows in at least
some circumstances, so you have to assume it's required under all
circumstances, correct?
Skip
More information about the Python-Dev
mailing list