[issue8604] Adding an atomic FS write API
STINNER Victor
report at bugs.python.org
Thu May 16 01:35:11 CEST 2013
STINNER Victor added the comment:
+ # Flush Python buffers to system buffers
+ fileobj.flush()
+
+ if hasattr(os, 'fsync'):
+ # Flush system buffers to disk
+ fd = fileobj.fileno()
+ os.fsync(fd)
A fsync=True paramater may be added if calling os.fsync() is an issue.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8604>
_______________________________________
More information about the Python-bugs-list
mailing list