Kaydet (Commit) 9b058119 authored tarafından Guido van Rossum's avatar Guido van Rossum

Added embryonic description of fcntl.lockf(). Added pointer to that

in posixfile (which is obsolescent).
üst 22f7f9e6
...@@ -42,6 +42,11 @@ See the Unix manual for details. (On some systems, this function is ...@@ -42,6 +42,11 @@ See the Unix manual for details. (On some systems, this function is
emulated using \code{fcntl}.) emulated using \code{fcntl}.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{lockf}{fd\, code\, \optional{len\, \optional{start\, \optional{whence}}}}
This is a wrapper around the \code{F_SETLK} and \code{F_SETLKW}
\code{fcntl()} calls. See the Unix manual for details.
\end{funcdesc}
If the library modules \code{FCNTL} or \code{IOCTL} are missing, you If the library modules \code{FCNTL} or \code{IOCTL} are missing, you
can find the opcodes in the C include files \code{sys/fcntl} and can find the opcodes in the C include files \code{sys/fcntl} and
\code{sys/ioctl}. You can create the modules yourself with the h2py \code{sys/ioctl}. You can create the modules yourself with the h2py
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
\bimodindex{posixfile} \bimodindex{posixfile}
\indexii{posix}{file object} \indexii{posix}{file object}
\emph{Note:} This module will become obsolete in a future release.
The locking operation that it provides is done better and more
portably by the \code{fcntl.lockf()} call.
This module implements some additional functionality over the built-in This module implements some additional functionality over the built-in
file objects. In particular, it implements file locking, control over file objects. In particular, it implements file locking, control over
the file flags, and an easy interface to duplicate the file object. the file flags, and an easy interface to duplicate the file object.
......
...@@ -42,6 +42,11 @@ See the Unix manual for details. (On some systems, this function is ...@@ -42,6 +42,11 @@ See the Unix manual for details. (On some systems, this function is
emulated using \code{fcntl}.) emulated using \code{fcntl}.)
\end{funcdesc} \end{funcdesc}
\begin{funcdesc}{lockf}{fd\, code\, \optional{len\, \optional{start\, \optional{whence}}}}
This is a wrapper around the \code{F_SETLK} and \code{F_SETLKW}
\code{fcntl()} calls. See the Unix manual for details.
\end{funcdesc}
If the library modules \code{FCNTL} or \code{IOCTL} are missing, you If the library modules \code{FCNTL} or \code{IOCTL} are missing, you
can find the opcodes in the C include files \code{sys/fcntl} and can find the opcodes in the C include files \code{sys/fcntl} and
\code{sys/ioctl}. You can create the modules yourself with the h2py \code{sys/ioctl}. You can create the modules yourself with the h2py
......
...@@ -3,6 +3,10 @@ ...@@ -3,6 +3,10 @@
\bimodindex{posixfile} \bimodindex{posixfile}
\indexii{posix}{file object} \indexii{posix}{file object}
\emph{Note:} This module will become obsolete in a future release.
The locking operation that it provides is done better and more
portably by the \code{fcntl.lockf()} call.
This module implements some additional functionality over the built-in This module implements some additional functionality over the built-in
file objects. In particular, it implements file locking, control over file objects. In particular, it implements file locking, control over
the file flags, and an easy interface to duplicate the file object. the file flags, and an easy interface to duplicate the file object.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment