[Patches] [ python-Patches-1514544 ] mailbox: use fsync() to ensure data is really on disk

SourceForge.net noreply at sourceforge.net
Mon Jul 31 22:26:44 CEST 2006


Patches item #1514544, was opened at 2006-06-29 14:27
Message generated for change (Settings changed) made by akuchling
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1514544&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Library (Lib)
Group: Python 2.5
Status: Open
Resolution: None
Priority: 5
Submitted By: David Watson (baikie)
>Assigned to: A.M. Kuchling (akuchling)
Summary: mailbox: use fsync() to ensure data is really on disk

Initial Comment:
The mailbox module currently does nothing to ensure
messages/indexes are physically on disk when the
flush() method returns or message files are closed. 
This patch adds functions _sync_flush and _sync_close
to flush and fsync() a file object, and in the latter
case close it afterwards.  _sync_close is then used
where needed throughout the code.  (For various reasons
the current implementation only ever requires a sync
immediately before closing a file, but _sync_flush is
provided for future use.)


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1514544&group_id=5470


More information about the Patches mailing list