[Python-checkins] CVS: python/dist/src/Doc/lib libfcntl.tex,1.27,1.28
Fred L. Drake
fdrake@users.sourceforge.net
Tue, 27 Nov 2001 23:48:34 -0800
Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv23680/lib
Modified Files:
libfcntl.tex
Log Message:
Clarify that on some systems, lockf() using LOCK_EX requires that the file
is opened for writing; this closes SF bug #485342.
Added notes that file objects are also accepted in the place of file
descriptors.
Index: libfcntl.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libfcntl.tex,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** libfcntl.tex 2001/11/28 07:26:15 1.27
--- libfcntl.tex 2001/11/28 07:48:32 1.28
***************
*** 17,21 ****
first argument. This can be an integer file descriptor, such as
returned by \code{sys.stdin.fileno()}, or a file object, such as
! \code{sys.stdin} itself.
The module defines the following functions:
--- 17,22 ----
first argument. This can be an integer file descriptor, such as
returned by \code{sys.stdin.fileno()}, or a file object, such as
! \code{sys.stdin} itself, which provides a \method{fileno()} which
! returns a genuine file descriptor.
The module defines the following functions:
***************
*** 23,27 ****
\begin{funcdesc}{fcntl}{fd, op\optional{, arg}}
! Perform the requested operation on file descriptor \var{fd}.
The operation is defined by \var{op} and is operating system
dependent. These codes are also found in the \module{fcntl}
--- 24,29 ----
\begin{funcdesc}{fcntl}{fd, op\optional{, arg}}
! Perform the requested operation on file descriptor \var{fd} (file
! objects providing a \method{fileno()} method are accepted as well).
The operation is defined by \var{op} and is operating system
dependent. These codes are also found in the \module{fcntl}
***************
*** 53,57 ****
\begin{funcdesc}{flock}{fd, op}
! Perform the lock operation \var{op} on file descriptor \var{fd}.
See the \UNIX{} manual \manpage{flock}{3} for details. (On some
systems, this function is emulated using \cfunction{fcntl()}.)
--- 55,60 ----
\begin{funcdesc}{flock}{fd, op}
! Perform the lock operation \var{op} on file descriptor \var{fd} (file
! objects providing a \method{fileno()} method are accepted as well).
See the \UNIX{} manual \manpage{flock}{3} for details. (On some
systems, this function is emulated using \cfunction{fcntl()}.)
***************
*** 76,80 ****
will have an \var{errno} attribute set to \constant{EACCES} or
\constant{EAGAIN} (depending on the operating system; for portability,
! check for both values).
\var{length} is the number of bytes to lock, \var{start} is the byte
--- 79,85 ----
will have an \var{errno} attribute set to \constant{EACCES} or
\constant{EAGAIN} (depending on the operating system; for portability,
! check for both values). On at least some systems, \constant{LOCK_EX}
! can only be used if the file descriptor refers to a file opened for
! writing.
\var{length} is the number of bytes to lock, \var{start} is the byte