home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 4d 61 6e 75 61 6c | 20 74 65 78 74 20 62 79 |% Manual| text by|
|00000010| 20 4a 61 61 70 20 56 65 | 72 6d 65 75 6c 65 6e 0a | Jaap Ve|rmeulen.|
|00000020| 5c 73 65 63 74 69 6f 6e | 7b 42 75 69 6c 74 2d 69 |\section|{Built-i|
|00000030| 6e 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |n Module| \sectco|
|00000040| 64 65 7b 66 63 6e 74 6c | 7d 7d 0a 5c 62 69 6d 6f |de{fcntl|}}.\bimo|
|00000050| 64 69 6e 64 65 78 7b 66 | 63 6e 74 6c 7d 0a 5c 69 |dindex{f|cntl}.\i|
|00000060| 6e 64 65 78 69 69 7b 5c | 55 4e 49 58 7b 7d 7d 7b |ndexii{\|UNIX{}}{|
|00000070| 66 69 6c 65 20 63 6f 6e | 74 72 6f 6c 7d 0a 5c 69 |file con|trol}.\i|
|00000080| 6e 64 65 78 69 69 7b 5c | 55 4e 49 58 7b 7d 7d 7b |ndexii{\|UNIX{}}{|
|00000090| 49 2f 4f 20 63 6f 6e 74 | 72 6f 6c 7d 0a 0a 54 68 |I/O cont|rol}..Th|
|000000a0| 69 73 20 6d 6f 64 75 6c | 65 20 70 65 72 66 6f 72 |is modul|e perfor|
|000000b0| 6d 73 20 66 69 6c 65 20 | 63 6f 6e 74 72 6f 6c 20 |ms file |control |
|000000c0| 61 6e 64 20 49 2f 4f 20 | 63 6f 6e 74 72 6f 6c 20 |and I/O |control |
|000000d0| 6f 6e 20 66 69 6c 65 20 | 64 65 73 63 72 69 70 74 |on file |descript|
|000000e0| 6f 72 73 2e 0a 49 74 20 | 69 73 20 61 6e 20 69 6e |ors..It |is an in|
|000000f0| 74 65 72 66 61 63 65 20 | 74 6f 20 74 68 65 20 5c |terface |to the \|
|00000100| 64 66 6e 7b 66 63 6e 74 | 6c 28 29 7d 20 61 6e 64 |dfn{fcnt|l()} and|
|00000110| 20 5c 64 66 6e 7b 69 6f | 63 74 6c 28 29 7d 20 5c | \dfn{io|ctl()} \|
|00000120| 55 4e 49 58 7b 7d 20 72 | 6f 75 74 69 6e 65 73 2e |UNIX{} r|outines.|
|00000130| 0a 46 69 6c 65 20 64 65 | 73 63 72 69 70 74 6f 72 |.File de|scriptor|
|00000140| 73 20 63 61 6e 20 62 65 | 20 6f 62 74 61 69 6e 65 |s can be| obtaine|
|00000150| 64 20 77 69 74 68 20 74 | 68 65 20 5c 64 66 6e 7b |d with t|he \dfn{|
|00000160| 66 69 6c 65 6e 6f 28 29 | 7d 20 6d 65 74 68 6f 64 |fileno()|} method|
|00000170| 20 6f 66 20 61 0a 66 69 | 6c 65 20 6f 72 20 73 6f | of a.fi|le or so|
|00000180| 63 6b 65 74 20 6f 62 6a | 65 63 74 2e 0a 0a 54 68 |cket obj|ect...Th|
|00000190| 65 20 6d 6f 64 75 6c 65 | 20 64 65 66 69 6e 65 73 |e module| defines|
|000001a0| 20 74 68 65 20 66 6f 6c | 6c 6f 77 69 6e 67 20 66 | the fol|lowing f|
|000001b0| 75 6e 63 74 69 6f 6e 73 | 3a 0a 0a 5c 72 65 6e 65 |unctions|:..\rene|
|000001c0| 77 63 6f 6d 6d 61 6e 64 | 7b 5c 69 6e 64 65 78 73 |wcommand|{\indexs|
|000001d0| 75 62 69 74 65 6d 7d 7b | 28 69 6e 20 6d 6f 64 75 |ubitem}{|(in modu|
|000001e0| 6c 65 20 73 74 72 75 63 | 74 29 7d 0a 0a 5c 62 65 |le struc|t)}..\be|
|000001f0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 66 63 |gin{func|desc}{fc|
|00000200| 6e 74 6c 7d 7b 66 64 5c | 2c 20 6f 70 5c 6f 70 74 |ntl}{fd\|, op\opt|
|00000210| 69 6f 6e 61 6c 7b 5c 2c | 20 61 72 67 7d 7d 0a 20 |ional{\,| arg}}. |
|00000220| 20 50 65 72 66 6f 72 6d | 20 74 68 65 20 72 65 71 | Perform| the req|
|00000230| 75 65 73 74 65 64 20 6f | 70 65 72 61 74 69 6f 6e |uested o|peration|
|00000240| 20 6f 6e 20 66 69 6c 65 | 20 64 65 73 63 72 69 70 | on file| descrip|
|00000250| 74 6f 72 20 5c 63 6f 64 | 65 7b 5c 76 61 72 7b 66 |tor \cod|e{\var{f|
|00000260| 64 7d 7d 2e 0a 20 20 54 | 68 65 20 6f 70 65 72 61 |d}}.. T|he opera|
|00000270| 74 69 6f 6e 20 69 73 20 | 64 65 66 69 6e 65 64 20 |tion is |defined |
|00000280| 62 79 20 5c 63 6f 64 65 | 7b 5c 76 61 72 7b 6f 70 |by \code|{\var{op|
|00000290| 7d 7d 20 61 6e 64 20 69 | 73 20 6f 70 65 72 61 74 |}} and i|s operat|
|000002a0| 69 6e 67 20 73 79 73 74 | 65 6d 0a 20 20 64 65 70 |ing syst|em. dep|
|000002b0| 65 6e 64 65 6e 74 2e 20 | 20 54 79 70 69 63 61 6c |endent. | Typical|
|000002c0| 6c 79 20 74 68 65 73 65 | 20 63 6f 64 65 73 20 63 |ly these| codes c|
|000002d0| 61 6e 20 62 65 20 72 65 | 74 72 69 65 76 65 64 20 |an be re|trieved |
|000002e0| 66 72 6f 6d 20 74 68 65 | 20 6c 69 62 72 61 72 79 |from the| library|
|000002f0| 0a 20 20 6d 6f 64 75 6c | 65 20 5c 63 6f 64 65 7b |. modul|e \code{|
|00000300| 46 43 4e 54 4c 7d 2e 20 | 54 68 65 20 61 72 67 75 |FCNTL}. |The argu|
|00000310| 6d 65 6e 74 20 5c 63 6f | 64 65 7b 5c 76 61 72 7b |ment \co|de{\var{|
|00000320| 61 72 67 7d 7d 20 69 73 | 20 6f 70 74 69 6f 6e 61 |arg}} is| optiona|
|00000330| 6c 2c 20 61 6e 64 0a 20 | 20 64 65 66 61 75 6c 74 |l, and. | default|
|00000340| 73 20 74 6f 20 74 68 65 | 20 69 6e 74 65 67 65 72 |s to the| integer|
|00000350| 20 76 61 6c 75 65 20 5c | 63 6f 64 65 7b 30 7d 2e | value \|code{0}.|
|00000360| 20 20 57 68 65 6e 0a 20 | 20 69 74 20 69 73 20 70 | When. | it is p|
|00000370| 72 65 73 65 6e 74 2c 20 | 69 74 20 63 61 6e 20 65 |resent, |it can e|
|00000380| 69 74 68 65 72 20 62 65 | 20 61 6e 20 69 6e 74 65 |ither be| an inte|
|00000390| 67 65 72 20 76 61 6c 75 | 65 2c 20 6f 72 20 61 20 |ger valu|e, or a |
|000003a0| 73 74 72 69 6e 67 2e 20 | 20 57 69 74 68 0a 20 20 |string. | With. |
|000003b0| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 20 6d 69 73 |the argu|ment mis|
|000003c0| 73 69 6e 67 20 6f 72 20 | 61 6e 20 69 6e 74 65 67 |sing or |an integ|
|000003d0| 65 72 20 76 61 6c 75 65 | 2c 20 74 68 65 20 72 65 |er value|, the re|
|000003e0| 74 75 72 6e 20 76 61 6c | 75 65 20 6f 66 20 74 68 |turn val|ue of th|
|000003f0| 69 73 0a 20 20 66 75 6e | 63 74 69 6f 6e 20 69 73 |is. fun|ction is|
|00000400| 20 74 68 65 20 69 6e 74 | 65 67 65 72 20 72 65 74 | the int|eger ret|
|00000410| 75 72 6e 20 76 61 6c 75 | 65 20 6f 66 20 74 68 65 |urn valu|e of the|
|00000420| 20 72 65 61 6c 20 5c 63 | 6f 64 65 7b 66 63 6e 74 | real \c|ode{fcnt|
|00000430| 6c 28 29 7d 0a 20 20 63 | 61 6c 6c 2e 20 20 57 68 |l()}. c|all. Wh|
|00000440| 65 6e 20 74 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |en the a|rgument |
|00000450| 69 73 20 61 20 73 74 72 | 69 6e 67 20 69 74 20 72 |is a str|ing it r|
|00000460| 65 70 72 65 73 65 6e 74 | 73 20 61 20 62 69 6e 61 |epresent|s a bina|
|00000470| 72 79 0a 20 20 73 74 72 | 75 63 74 75 72 65 2c 20 |ry. str|ucture, |
|00000480| 65 2e 67 2e 5c 20 63 72 | 65 61 74 65 64 20 62 79 |e.g.\ cr|eated by|
|00000490| 20 5c 63 6f 64 65 7b 73 | 74 72 75 63 74 2e 70 61 | \code{s|truct.pa|
|000004a0| 63 6b 28 29 7d 2e 20 54 | 68 65 20 62 69 6e 61 72 |ck()}. T|he binar|
|000004b0| 79 20 64 61 74 61 20 69 | 73 0a 20 20 63 6f 70 69 |y data i|s. copi|
|000004c0| 65 64 20 74 6f 20 61 20 | 62 75 66 66 65 72 20 77 |ed to a |buffer w|
|000004d0| 68 6f 73 65 20 61 64 64 | 72 65 73 73 20 69 73 20 |hose add|ress is |
|000004e0| 70 61 73 73 65 64 20 74 | 6f 20 74 68 65 20 72 65 |passed t|o the re|
|000004f0| 61 6c 20 5c 63 6f 64 65 | 7b 66 63 6e 74 6c 28 29 |al \code|{fcntl()|
|00000500| 7d 0a 20 20 63 61 6c 6c | 2e 20 20 54 68 65 20 72 |}. call|. The r|
|00000510| 65 74 75 72 6e 20 76 61 | 6c 75 65 20 61 66 74 65 |eturn va|lue afte|
|00000520| 72 20 61 20 73 75 63 63 | 65 73 73 66 75 6c 20 63 |r a succ|essful c|
|00000530| 61 6c 6c 20 69 73 20 74 | 68 65 20 63 6f 6e 74 65 |all is t|he conte|
|00000540| 6e 74 73 20 6f 66 0a 20 | 20 74 68 65 20 62 75 66 |nts of. | the buf|
|00000550| 66 65 72 2c 20 63 6f 6e | 76 65 72 74 65 64 20 74 |fer, con|verted t|
|00000560| 6f 20 61 20 73 74 72 69 | 6e 67 20 6f 62 6a 65 63 |o a stri|ng objec|
|00000570| 74 2e 20 20 49 6e 20 63 | 61 73 65 20 74 68 65 0a |t. In c|ase the.|
|00000580| 20 20 5c 63 6f 64 65 7b | 66 63 6e 74 6c 28 29 7d | \code{|fcntl()}|
|00000590| 20 66 61 69 6c 73 2c 20 | 61 6e 20 5c 63 6f 64 65 | fails, |an \code|
|000005a0| 7b 49 4f 45 72 72 6f 72 | 7d 20 77 69 6c 6c 20 62 |{IOError|} will b|
|000005b0| 65 20 72 61 69 73 65 64 | 2e 0a 5c 65 6e 64 7b 66 |e raised|..\end{f|
|000005c0| 75 6e 63 64 65 73 63 7d | 0a 0a 5c 62 65 67 69 6e |uncdesc}|..\begin|
|000005d0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 69 6f 63 74 6c |{funcdes|c}{ioctl|
|000005e0| 7d 7b 66 64 5c 2c 20 6f | 70 5c 2c 20 61 72 67 7d |}{fd\, o|p\, arg}|
|000005f0| 0a 20 20 54 68 69 73 20 | 66 75 6e 63 74 69 6f 6e |. This |function|
|00000600| 20 69 73 20 69 64 65 6e | 74 69 63 61 6c 20 74 6f | is iden|tical to|
|00000610| 20 74 68 65 20 5c 63 6f | 64 65 7b 66 63 6e 74 6c | the \co|de{fcntl|
|00000620| 28 29 7d 20 66 75 6e 63 | 74 69 6f 6e 2c 20 65 78 |()} func|tion, ex|
|00000630| 63 65 70 74 0a 20 20 74 | 68 61 74 20 74 68 65 20 |cept. t|hat the |
|00000640| 6f 70 65 72 61 74 69 6f | 6e 73 20 61 72 65 20 74 |operatio|ns are t|
|00000650| 79 70 69 63 61 6c 6c 79 | 20 64 65 66 69 6e 65 64 |ypically| defined|
|00000660| 20 69 6e 20 74 68 65 20 | 6c 69 62 72 61 72 79 20 | in the |library |
|00000670| 6d 6f 64 75 6c 65 0a 20 | 20 5c 63 6f 64 65 7b 49 |module. | \code{I|
|00000680| 4f 43 54 4c 7d 2e 0a 5c | 65 6e 64 7b 66 75 6e 63 |OCTL}..\|end{func|
|00000690| 64 65 73 63 7d 0a 0a 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|000006a0| 6e 63 64 65 73 63 7d 7b | 66 6c 6f 63 6b 7d 7b 66 |ncdesc}{|flock}{f|
|000006b0| 64 5c 2c 20 6f 70 7d 0a | 50 65 72 66 6f 72 6d 20 |d\, op}.|Perform |
|000006c0| 74 68 65 20 6c 6f 63 6b | 20 6f 70 65 72 61 74 69 |the lock| operati|
|000006d0| 6f 6e 20 5c 76 61 72 7b | 6f 70 7d 20 6f 6e 20 66 |on \var{|op} on f|
|000006e0| 69 6c 65 20 64 65 73 63 | 72 69 70 74 6f 72 20 5c |ile desc|riptor \|
|000006f0| 76 61 72 7b 66 64 7d 2e | 0a 53 65 65 20 74 68 65 |var{fd}.|.See the|
|00000700| 20 55 6e 69 78 20 6d 61 | 6e 75 61 6c 20 66 6f 72 | Unix ma|nual for|
|00000710| 20 64 65 74 61 69 6c 73 | 2e 20 20 28 4f 6e 20 73 | details|. (On s|
|00000720| 6f 6d 65 20 73 79 73 74 | 65 6d 73 2c 20 74 68 69 |ome syst|ems, thi|
|00000730| 73 20 66 75 6e 63 74 69 | 6f 6e 20 69 73 0a 65 6d |s functi|on is.em|
|00000740| 75 6c 61 74 65 64 20 75 | 73 69 6e 67 20 5c 63 6f |ulated u|sing \co|
|00000750| 64 65 7b 66 63 6e 74 6c | 7d 2e 29 0a 5c 65 6e 64 |de{fcntl|}.).\end|
|00000760| 7b 66 75 6e 63 64 65 73 | 63 7d 0a 0a 5c 62 65 67 |{funcdes|c}..\beg|
|00000770| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 6c 6f 63 |in{funcd|esc}{loc|
|00000780| 6b 66 7d 7b 66 64 5c 2c | 20 63 6f 64 65 5c 2c 20 |kf}{fd\,| code\, |
|00000790| 5c 6f 70 74 69 6f 6e 61 | 6c 7b 6c 65 6e 5c 2c 20 |\optiona|l{len\, |
|000007a0| 5c 6f 70 74 69 6f 6e 61 | 6c 7b 73 74 61 72 74 5c |\optiona|l{start\|
|000007b0| 2c 20 5c 6f 70 74 69 6f | 6e 61 6c 7b 77 68 65 6e |, \optio|nal{when|
|000007c0| 63 65 7d 7d 7d 7d 0a 54 | 68 69 73 20 69 73 20 61 |ce}}}}.T|his is a|
|000007d0| 20 77 72 61 70 70 65 72 | 20 61 72 6f 75 6e 64 20 | wrapper| around |
|000007e0| 74 68 65 20 5c 63 6f 64 | 65 7b 46 5f 53 45 54 4c |the \cod|e{F_SETL|
|000007f0| 4b 7d 20 61 6e 64 20 5c | 63 6f 64 65 7b 46 5f 53 |K} and \|code{F_S|
|00000800| 45 54 4c 4b 57 7d 0a 5c | 63 6f 64 65 7b 66 63 6e |ETLKW}.\|code{fcn|
|00000810| 74 6c 28 29 7d 20 63 61 | 6c 6c 73 2e 20 20 53 65 |tl()} ca|lls. Se|
|00000820| 65 20 74 68 65 20 55 6e | 69 78 20 6d 61 6e 75 61 |e the Un|ix manua|
|00000830| 6c 20 66 6f 72 20 64 65 | 74 61 69 6c 73 2e 0a 5c |l for de|tails..\|
|00000840| 65 6e 64 7b 66 75 6e 63 | 64 65 73 63 7d 0a 0a 49 |end{func|desc}..I|
|00000850| 66 20 74 68 65 20 6c 69 | 62 72 61 72 79 20 6d 6f |f the li|brary mo|
|00000860| 64 75 6c 65 73 20 5c 63 | 6f 64 65 7b 46 43 4e 54 |dules \c|ode{FCNT|
|00000870| 4c 7d 20 6f 72 20 5c 63 | 6f 64 65 7b 49 4f 43 54 |L} or \c|ode{IOCT|
|00000880| 4c 7d 20 61 72 65 20 6d | 69 73 73 69 6e 67 2c 20 |L} are m|issing, |
|00000890| 79 6f 75 0a 63 61 6e 20 | 66 69 6e 64 20 74 68 65 |you.can |find the|
|000008a0| 20 6f 70 63 6f 64 65 73 | 20 69 6e 20 74 68 65 20 | opcodes| in the |
|000008b0| 43 20 69 6e 63 6c 75 64 | 65 20 66 69 6c 65 73 20 |C includ|e files |
|000008c0| 5c 63 6f 64 65 7b 73 79 | 73 2f 66 63 6e 74 6c 7d |\code{sy|s/fcntl}|
|000008d0| 20 61 6e 64 0a 5c 63 6f | 64 65 7b 73 79 73 2f 69 | and.\co|de{sys/i|
|000008e0| 6f 63 74 6c 7d 2e 20 59 | 6f 75 20 63 61 6e 20 63 |octl}. Y|ou can c|
|000008f0| 72 65 61 74 65 20 74 68 | 65 20 6d 6f 64 75 6c 65 |reate th|e module|
|00000900| 73 20 79 6f 75 72 73 65 | 6c 66 20 77 69 74 68 20 |s yourse|lf with |
|00000910| 74 68 65 20 68 32 70 79 | 0a 73 63 72 69 70 74 2c |the h2py|.script,|
|00000920| 20 66 6f 75 6e 64 20 69 | 6e 20 74 68 65 20 5c 63 | found i|n the \c|
|00000930| 6f 64 65 7b 54 6f 6f 6c | 73 2f 73 63 72 69 70 74 |ode{Tool|s/script|
|00000940| 73 7d 20 64 69 72 65 63 | 74 6f 72 79 2e 0a 5c 73 |s} direc|tory..\s|
|00000950| 74 6d 6f 64 69 6e 64 65 | 78 7b 46 43 4e 54 4c 7d |tmodinde|x{FCNTL}|
|00000960| 0a 5c 73 74 6d 6f 64 69 | 6e 64 65 78 7b 49 4f 43 |.\stmodi|ndex{IOC|
|00000970| 54 4c 7d 0a 0a 45 78 61 | 6d 70 6c 65 73 20 28 61 |TL}..Exa|mples (a|
|00000980| 6c 6c 20 6f 6e 20 61 20 | 53 56 52 34 20 63 6f 6d |ll on a |SVR4 com|
|00000990| 70 6c 69 61 6e 74 20 73 | 79 73 74 65 6d 29 3a 0a |pliant s|ystem):.|
|000009a0| 0a 5c 62 63 6f 64 65 5c | 62 65 67 69 6e 7b 76 65 |.\bcode\|begin{ve|
|000009b0| 72 62 61 74 69 6d 7d 0a | 69 6d 70 6f 72 74 20 73 |rbatim}.|import s|
|000009c0| 74 72 75 63 74 2c 20 46 | 43 4e 54 4c 0a 0a 66 69 |truct, F|CNTL..fi|
|000009d0| 6c 65 20 3d 20 6f 70 65 | 6e 28 2e 2e 2e 29 0a 72 |le = ope|n(...).r|
|000009e0| 76 20 3d 20 66 63 6e 74 | 6c 28 66 69 6c 65 2e 66 |v = fcnt|l(file.f|
|000009f0| 69 6c 65 6e 6f 28 29 2c | 20 46 43 4e 54 4c 2e 4f |ileno(),| FCNTL.O|
|00000a00| 5f 4e 44 45 4c 41 59 2c | 20 31 29 0a 0a 6c 6f 63 |_NDELAY,| 1)..loc|
|00000a10| 6b 64 61 74 61 20 3d 20 | 73 74 72 75 63 74 2e 70 |kdata = |struct.p|
|00000a20| 61 63 6b 28 27 68 68 6c | 6c 68 68 27 2c 20 46 43 |ack('hhl|lhh', FC|
|00000a30| 4e 54 4c 2e 46 5f 57 52 | 4c 43 4b 2c 20 30 2c 20 |NTL.F_WR|LCK, 0, |
|00000a40| 30 2c 20 30 2c 20 30 2c | 20 30 29 0a 72 76 20 3d |0, 0, 0,| 0).rv =|
|00000a50| 20 66 63 6e 74 6c 28 66 | 69 6c 65 2e 66 69 6c 65 | fcntl(f|ile.file|
|00000a60| 6e 6f 28 29 2c 20 46 43 | 4e 54 4c 2e 46 5f 53 45 |no(), FC|NTL.F_SE|
|00000a70| 54 4c 4b 57 2c 20 6c 6f | 63 6b 64 61 74 61 29 0a |TLKW, lo|ckdata).|
|00000a80| 5c 65 6e 64 7b 76 65 72 | 62 61 74 69 6d 7d 5c 65 |\end{ver|batim}\e|
|00000a90| 63 6f 64 65 0a 0a 4e 6f | 74 65 20 74 68 61 74 20 |code..No|te that |
|00000aa0| 69 6e 20 74 68 65 20 66 | 69 72 73 74 20 65 78 61 |in the f|irst exa|
|00000ab0| 6d 70 6c 65 20 74 68 65 | 20 72 65 74 75 72 6e 20 |mple the| return |
|00000ac0| 76 61 6c 75 65 20 76 61 | 72 69 61 62 6c 65 20 5c |value va|riable \|
|00000ad0| 63 6f 64 65 7b 72 76 7d | 20 77 69 6c 6c 0a 68 6f |code{rv}| will.ho|
|00000ae0| 6c 64 20 61 6e 20 69 6e | 74 65 67 65 72 20 76 61 |ld an in|teger va|
|00000af0| 6c 75 65 3b 20 69 6e 20 | 74 68 65 20 73 65 63 6f |lue; in |the seco|
|00000b00| 6e 64 20 65 78 61 6d 70 | 6c 65 20 69 74 20 77 69 |nd examp|le it wi|
|00000b10| 6c 6c 20 68 6f 6c 64 20 | 61 20 73 74 72 69 6e 67 |ll hold |a string|
|00000b20| 0a 76 61 6c 75 65 2e 20 | 20 54 68 65 20 73 74 72 |.value. | The str|
|00000b30| 75 63 74 75 72 65 20 6c | 61 79 2d 6f 75 74 20 66 |ucture l|ay-out f|
|00000b40| 6f 72 20 74 68 65 20 5c | 76 61 72 7b 6c 6f 63 6b |or the \|var{lock|
|00000b50| 61 64 61 74 61 7d 20 76 | 61 72 69 61 62 6c 65 20 |adata} v|ariable |
|00000b60| 69 73 0a 73 79 73 74 65 | 6d 20 64 65 70 65 6e 64 |is.syste|m depend|
|00000b70| 65 6e 74 20 2d 2d 20 74 | 68 65 72 65 66 6f 72 65 |ent -- t|herefore|
|00000b80| 20 75 73 69 6e 67 20 74 | 68 65 20 5c 63 6f 64 65 | using t|he \code|
|00000b90| 7b 66 6c 6f 63 6b 28 29 | 7d 20 63 61 6c 6c 20 6d |{flock()|} call m|
|00000ba0| 61 79 20 62 65 0a 62 65 | 74 74 65 72 2e 0a |ay be.be|tter.. |
+--------+-------------------------+-------------------------+--------+--------+