confusion about opening files

Greg Ewing see_reply_address at something.invalid
Wed Sep 25 05:19:30 CEST 2002

> Flush, and unbuffered files, ASK the OS to please, please write the
> data out -- but not all OS's comply.

Even on Unix, I'm not sure that flush() ensures that
the data is physically written to the disk. The Linux
man page for fflush(3) says:

        Note  that fflush only flushes the user space buffers pro­
        vided by the C library.  To ensure that the data is physi­
        cally  stored  on  disk the kernel buffers must be flushed
        too, e.g. with sync(2) or fsync(2).

Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand

More information about the Python-list mailing list