summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-06-26 19:20:33 (GMT)
committerGuido van Rossum <guido@python.org>1996-06-26 19:20:33 (GMT)
commit50ec5c074ab23fe0fc67915a7c3208faaf8d61d7 (patch)
treea82e8affc5870f64d5a643e159f73affc3922108 /Doc/lib
parent164c36b6c3f2eccd0f78cbf8755194c75693196f (diff)
downloadcpython-50ec5c074ab23fe0fc67915a7c3208faaf8d61d7.zip
cpython-50ec5c074ab23fe0fc67915a7c3208faaf8d61d7.tar.gz
cpython-50ec5c074ab23fe0fc67915a7c3208faaf8d61d7.tar.bz2
Add flock; warn about lockdata system dependency when using fcntl.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libfcntl.tex10
1 files changed, 9 insertions, 1 deletions
diff --git a/Doc/lib/libfcntl.tex b/Doc/lib/libfcntl.tex
index 8539e2a..1aba520 100644
--- a/Doc/lib/libfcntl.tex
+++ b/Doc/lib/libfcntl.tex
@@ -36,6 +36,12 @@ The module defines the following functions:
\code{IOCTL}.
\end{funcdesc}
+\begin{funcdesc}{flock}{fd\, op}
+Perform the lock operation \var{op} on file descriptor \var{fd}.
+See the Unix manual for details. (On some systems, this function is
+emulated using \code{fcntl}.)
+\end{funcdesc}
+
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
\code{sys/ioctl}. You can create the modules yourself with the h2py
@@ -57,4 +63,6 @@ rv = fcntl(file.fileno(), FCNTL.F_SETLKW, lockdata)
Note that in the first example the return value variable \code{rv} will
hold an integer value; in the second example it will hold a string
-value.
+value. The structure lay-out for the \var{lockadata} variable is
+system dependent -- therefore using the \code{flock()} call may be
+better.