[Python-checkins] python/dist/src/Doc/lib libos.tex,1.74.2.1.2.13,1.74.2.1.2.14

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Wed, 23 Apr 2003 13:14:39 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory sc8-pr-cvs1:/tmp/cvs-serv14722/Doc/lib

Modified Files:
      Tag: release22-maint
	libos.tex 
Log Message:
fsync():  Implemented for Windows, via calling MS _commit.  This counts
as "a bug" because there's no other way in core Python to ensure that
bytes written are actually on disk.  At least ZODB wants this guarantee,
for robustness against crashes.


Index: libos.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libos.tex,v
retrieving revision 1.74.2.1.2.13
retrieving revision 1.74.2.1.2.14
diff -C2 -d -r1.74.2.1.2.13 -r1.74.2.1.2.14
*** libos.tex	20 Mar 2003 17:42:48 -0000	1.74.2.1.2.13
--- libos.tex	23 Apr 2003 20:14:06 -0000	1.74.2.1.2.14
***************
*** 434,439 ****
  
  \begin{funcdesc}{fsync}{fd}
! Force write of file with filedescriptor \var{fd} to disk.
! Availability: \UNIX.
  \end{funcdesc}
  
--- 434,446 ----
  
  \begin{funcdesc}{fsync}{fd}
! Force write of file with filedescriptor \var{fd} to disk.  On \UNIX,
! this calls the native \cfunction{fsync()} function; on Windows, the
! MS \cfunction{_commit()} function.
! 
! If you're starting with a Python file object \var{f}, first do
! \code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno()},
! to ensure that all internal buffers associated with \var{f} are written
! to disk.
! Availability: \UNIX, and Windows starting in 2.2.3.
  \end{funcdesc}