Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b942c2f

Browse files
committed
Fixed bug in example.
This closes SF bug #415522. Also fix markup error in text following the example.
1 parent 34d37dc commit b942c2f

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Doc/lib/libfcntl.tex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -106,13 +106,13 @@ \section{\module{fcntl} ---
106106
import struct, fcntl, FCNTL
107107
108108
file = open(...)
109-
rv = fcntl(file.fileno(), FCNTL.O_NDELAY, 1)
109+
rv = fcntl(file.fileno(), FCNTL.F_SETFL, FCNTL.O_NDELAY)
110110
111111
lockdata = struct.pack('hhllhh', FCNTL.F_WRLCK, 0, 0, 0, 0, 0)
112112
rv = fcntl.fcntl(file.fileno(), FCNTL.F_SETLKW, lockdata)
113113
\end{verbatim}
114114

115-
Note that in the first example the return value variable \code{rv} will
115+
Note that in the first example the return value variable \var{rv} will
116116
hold an integer value; in the second example it will hold a string
117117
value. The structure lay-out for the \var{lockdata} variable is
118118
system dependent --- therefore using the \function{flock()} call may be

0 commit comments

Comments
 (0)