Fixed bug in example.

This closes SF bug #415522.

Also fix markup error in text following the example.
This commit is contained in:
Fred Drake 2001-04-11 21:33:47 +00:00
parent 34d37dc5d2
commit b942c2f788
1 changed files with 2 additions and 2 deletions

View File

@ -106,13 +106,13 @@ Examples (all on a SVR4 compliant system):
import struct, fcntl, FCNTL import struct, fcntl, FCNTL
file = open(...) file = open(...)
rv = fcntl(file.fileno(), FCNTL.O_NDELAY, 1) rv = fcntl(file.fileno(), FCNTL.F_SETFL, FCNTL.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(file.fileno(), FCNTL.F_SETLKW, lockdata) rv = fcntl.fcntl(file.fileno(), FCNTL.F_SETLKW, lockdata)
\end{verbatim} \end{verbatim}
Note that in the first example the return value variable \code{rv} will Note that in the first example the return value variable \var{rv} will
hold an integer value; in the second example it will hold a string hold an integer value; in the second example it will hold a string
value. The structure lay-out for the \var{lockdata} variable is value. The structure lay-out for the \var{lockdata} variable is
system dependent --- therefore using the \function{flock()} call may be system dependent --- therefore using the \function{flock()} call may be