[Mailman-Developers] Problem with MM after power outage

Brad Knowles brad.knowles at skynet.be
Tue Aug 26 01:49:48 EDT 2003


At 10:11 PM +0200 2003/08/25, Simone Piunno wrote:

>    fsync(fd)
>    Force write of file with filedescriptor fd to disk. On Unix, this calls the
>    native fsync() function; on Windows, the MS _commit() function.
>    If you're starting with a Python file object f, first do 
>f.flush(), and then
>    do os.fsync(f.fileno()), to ensure that all internal buffers 
>associated with
>    f are written to disk. Availability: Unix, and Windows starting in 2.2.3.

	That's the one you want.  You're getting nailed on the meta-data 
which is not being flushed to disk before the rename.

>  Because the python documentation says nothing about close() calling fsync()
>  automatically, I assume it does not.

	Indeed.  ;(

-- 
Brad Knowles, <brad.knowles at skynet.be>

"They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety."
     -Benjamin Franklin, Historical Review of Pennsylvania.

GCS/IT d+(-) s:+(++)>: a C++(+++)$ UMBSHI++++$ P+>++ L+ !E-(---) W+++(--) N+
!w--- O- M++ V PS++(+++) PE- Y+(++) PGP>+++ t+(+++) 5++(+++) X++(+++) R+(+++)
tv+(+++) b+(++++) DI+(++++) D+(++) G+(++++) e++>++++ h--- r---(+++)* z(+++)



More information about the Mailman-Developers mailing list