Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2d1c846

Browse files
committed
Clarified new fsync() docs.
1 parent 5eccabc commit 2d1c846

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

Doc/lib/libos.tex

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -448,14 +448,15 @@ \subsection{File Descriptor Operations \label{os-fd-ops}}
448448
\end{funcdesc}
449449

450450
\begin{funcdesc}{fsync}{fd}
451-
Force write of file with filedescriptor \var{fd} to disk.
451+
Force write of file with filedescriptor \var{fd} to disk. On \UNIX,
452+
this calls the native \cfunction{fsync()} function; on Windows, the
453+
MS \cfunction{_commit()} function.
452454

453-
On Windows this calls the MS \cfunction{_commit()} function. If you're
454-
starting with a Python file object \var{f}, first do
455+
If you're starting with a Python file object \var{f}, first do
455456
\code{\var{f}.flush()}, and then do \code{os.fsync(\var{f}.fileno()},
456457
to ensure that all internal buffers associated with \var{f} are written
457458
to disk.
458-
Availability: \UNIX, and Windows starting in 2.3.
459+
Availability: \UNIX, and Windows starting in 2.2.3.
459460
\end{funcdesc}
460461

461462
\begin{funcdesc}{ftruncate}{fd, length}

0 commit comments

Comments
 (0)