summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorNeal Norwitz <nnorwitz@gmail.com>2004-07-21 01:41:14 (GMT)
committerNeal Norwitz <nnorwitz@gmail.com>2004-07-21 01:41:14 (GMT)
commit7728b4719e08cb64d4c77051338c2b54a57b867e (patch)
treef12541f838215b0673fa2f9a1e7c18f14cec6448 /Doc/lib
parentdc8e1942dddd6923fe9cfbadc6644a9888094699 (diff)
downloadcpython-7728b4719e08cb64d4c77051338c2b54a57b867e.zip
cpython-7728b4719e08cb64d4c77051338c2b54a57b867e.tar.gz
cpython-7728b4719e08cb64d4c77051338c2b54a57b867e.tar.bz2
SF #994605, fcntl example is broken
The last call to fcntl (which wasn't changed) doesn't work for me, but the first part works now. Backport candidate.
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libfcntl.tex6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/lib/libfcntl.tex b/Doc/lib/libfcntl.tex
index f7d4438..df258ee 100644
--- a/Doc/lib/libfcntl.tex
+++ b/Doc/lib/libfcntl.tex
@@ -151,10 +151,10 @@ to lock to the end of the file. The default for \var{whence} is also
Examples (all on a SVR4 compliant system):
\begin{verbatim}
-import struct, fcntl
+import struct, fcntl, os
-f = file(...)
-rv = fcntl(f, fcntl.F_SETFL, os.O_NDELAY)
+f = open(...)
+rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)
lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)