Kaydet (Commit) 7728b471 authored tarafından Neal Norwitz's avatar Neal Norwitz

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.
üst dc8e1942
...@@ -151,10 +151,10 @@ to lock to the end of the file. The default for \var{whence} is also ...@@ -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): Examples (all on a SVR4 compliant system):
\begin{verbatim} \begin{verbatim}
import struct, fcntl import struct, fcntl, os
f = file(...) f = open(...)
rv = fcntl(f, fcntl.F_SETFL, os.O_NDELAY) rv = fcntl.fcntl(f, fcntl.F_SETFL, os.O_NDELAY)
lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0) lockdata = struct.pack('hhllhh', fcntl.F_WRLCK, 0, 0, 0, 0, 0)
rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata) rv = fcntl.fcntl(f, fcntl.F_SETLKW, lockdata)
......
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