DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: f

⟦90b0a3b81⟧

    Length: 11534 (0x2d0e)
    Names: »fcntl.2«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/man/cat2/fcntl.2« 

Default Hex Dump

0x0000…0020 0a 0a 0a 5f 08 4f 5f 08 6e 5f 08 6c 5f 08 69 5f 08 6e 5f 08 65 20 5f 08 4d 5f 08 61 5f 08 6e 5f   ┆   _ O_ n_ l_ i_ n_ e _ M_ a_ n_┆
0x0020…0040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 20 20 53 79 73 74 65 6d 20 43 61 6c 6c   ┆ u_ a_ l             System Call┆
0x0040…0060 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 63 6e 74 6c 28 32 29 0a 0a 0a 0a   ┆s                   fcntl(2)    ┆
0x0060…0080 4e 08 4e 08 4e 08 4e 41 08 41 08 41 08 41 4d 08 4d 08 4d 08 4d 45 08 45 08 45 08 45 0a 20 20 20   ┆N N N NA A A AM M M ME E E E    ┆
0x0080…00a0 20 20 66 63 6e 74 6c 20 2d 20 66 69 6c 65 20 63 6f 6e 74 72 6f 6c 0a 0a 53 08 53 08 53 08 53 59   ┆  fcntl - file control  S S S SY┆
0x00a0…00c0 08 59 08 59 08 59 4e 08 4e 08 4e 08 4e 54 08 54 08 54 08 54 41 08 41 08 41 08 41 58 08 58 08 58   ┆ Y Y YN N N NT T T TA A A AX X X┆
0x00c0…00e0 08 58 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63   ┆ X      # # # #i i i in n n nc c┆
0x00e0…0100 08 63 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65   ┆ c cl l l lu u u ud d d de e e e┆
0x0100…0120 20 3c 08 3c 08 3c 08 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e 08 6e 08 6e 08 6e 74 08 74   ┆ < < < <f f f fc c c cn n n nt t┆
0x0120…0140 08 74 08 74 6c 08 6c 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e   ┆ t tl l l l. . . .h h h h> > > >┆
0x0140…0160 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63   ┆      # # # #i i i in n n nc c c┆
0x0160…0180 08 63 6c 08 6c 08 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c   ┆ cl l l lu u u ud d d de e e e <┆
0x0180…01a0 08 3c 08 3c 08 3c 73 08 73 08 73 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f   ┆ < < <s s s sy y y ys s s s/ / /┆
0x01a0…01c0 08 2f 74 08 74 08 74 08 74 79 08 79 08 79 08 79 70 08 70 08 70 08 70 65 08 65 08 65 08 65 73 08   ┆ /t t t ty y y yp p p pe e e es ┆
0x01c0…01e0 73 08 73 08 73 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a 20 20 20 20 20   ┆s s s. . . .h h h h> > > >      ┆
0x01e0…0200 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 63 08 63 08 63 08 63 6c 08 6c 08   ┆# # # #i i i in n n nc c c cl l ┆
0x0200…0220 6c 08 6c 75 08 75 08 75 08 75 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 3c 08 3c 08 3c 08 3c   ┆l lu u u ud d d de e e e < < < <┆
0x0220…0240 75 08 75 08 75 08 75 6e 08 6e 08 6e 08 6e 69 08 69 08 69 08 69 73 08 73 08 73 08 73 74 08 74 08   ┆u u u un n n ni i i is s s st t ┆
0x0240…0260 74 08 74 64 08 64 08 64 08 64 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a   ┆t td d d d. . . .h h h h> > > > ┆
0x0260…0280 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 66 08 66 08   ┆      i i i in n n nt t t t f f ┆
0x0280…02a0 66 08 66 63 08 63 08 63 08 63 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 6c 08 6c 08 6c 08 6c 28   ┆f fc c c cn n n nt t t tl l l l(┆
0x02a0…02c0 08 28 08 28 08 28 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6c 08 6c 08 6c 08 6c 64 08 64 08 64   ┆ ( ( (f f f fi i i il l l ld d d┆
0x02c0…02e0 08 64 65 08 65 08 65 08 65 73 08 73 08 73 08 73 2c 08 2c 08 2c 08 2c 20 63 08 63 08 63 08 63 6d   ┆ de e e es s s s, , , , c c c cm┆
0x02e0…0300 08 6d 08 6d 08 6d 64 08 64 08 64 08 64 2c 08 2c 08 2c 08 2c 20 2e 08 2e 08 2e 08 2e 2e 08 2e 08   ┆ m m md d d d, , , , . . . .. . ┆
0x0300…0320 2e 08 2e 2e 08 2e 08 2e 08 2e 29 08 29 08 29 08 29 0a 20 20 20 20 20 69 08 69 08 69 08 69 6e 08   ┆. .. . . .) ) ) )      i i i in ┆
0x0320…0340 6e 08 6e 08 6e 74 08 74 08 74 08 74 20 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6c 08 6c 08 6c   ┆n n nt t t t f f f fi i i il l l┆
0x0340…0360 08 6c 64 08 64 08 64 08 64 65 08 65 08 65 08 65 73 08 73 08 73 08 73 2c 08 2c 08 2c 08 2c 20 63   ┆ ld d d de e e es s s s, , , , c┆
0x0360…0380 08 63 08 63 08 63 6d 08 6d 08 6d 08 6d 64 08 64 08 64 08 64 3b 08 3b 08 3b 08 3b 0a 0a 44 08 44   ┆ c c cm m m md d d d; ; ; ;  D D┆
0x0380…03a0 08 44 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52   ┆ D DE E E ES S S SC C C CR R R R┆
0x03a0…03c0 49 08 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08   ┆I I I IP P P PT T T TI I I IO O ┆
0x03c0…03e0 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 54 68 65 20 66 75 6e 63 74 69 6f 6e 20 5f 08 66   ┆O ON N N N      The function _ f┆
0x03e0…0400 5f 08 63 5f 08 6e 5f 08 74 5f 08 6c 20 70 72 6f 76 69 64 65 73 20 66 6f 72 20 63 6f 6e 74 72 6f   ┆_ c_ n_ t_ l provides for contro┆
0x0400…0420 6c 20 6f 76 65 72 20 6f 70 65 6e 20 66 69 6c 65 73 2e 0a 0a 20 20 20 20 20 54 68 65 20 61 72 67   ┆l over open files.       The arg┆
0x0420…0440 75 6d 65 6e 74 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 64 5f 08 65 5f 08 73 20 69 73 20 61 6e 20 6f   ┆ument _ f_ i_ l_ d_ e_ s is an o┆
0x0440…0460 70 65 6e 20 66 69 6c 65 2d 64 65 73 63 72 69 70 74 6f 72 2e 0a 0a 20 20 20 20 20 54 68 65 20 61   ┆pen file-descriptor.       The a┆
0x0460…0480 76 61 69 6c 61 62 6c 65 20 76 61 6c 75 65 73 20 66 6f 72 20 5f 08 63 5f 08 6d 5f 08 64 20 61 72   ┆vailable values for _ c_ m_ d ar┆
0x0480…04a0 65 20 64 65 66 69 6e 65 64 20 69 6e 20 74 68 65 20 68 65 61 64 65 72 20 66 69 6c 65 0a 20 20 20   ┆e defined in the header file    ┆
0x04a0…04c0 20 20 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 6c   ┆  <f f f fc c c cn n n nt t t tl┆
0x04c0…04e0 08 6c 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 2c 20 77 68 69 63 68 20 69 6e 63   ┆ l l l. . . .h h h h>, which inc┆
0x04e0…0500 6c 75 64 65 3a 0a 0a 20 20 20 20 20 46 5f 44 55 50 46 44 20 20 20 20 20 52 65 74 75 72 6e 20 61   ┆lude:       F_DUPFD     Return a┆
0x0500…0520 20 6e 65 77 20 66 69 6c 65 2d 64 65 73 63 72 69 70 74 6f 72 20 61 73 20 66 6f 6c 6c 6f 77 73 3a   ┆ new file-descriptor as follows:┆
0x0520…0540 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 20 53 6d 61 6c 6c 65 73 74 20 61 76 61   ┆                  - Smallest ava┆
0x0540…0560 69 6c 61 62 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 3e 20 6f 72 20 3d 20 5f 08 61 5f 08 72 5f   ┆ilable descriptor > or = _ a_ r_┆
0x0560…0580 08 67 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 20 48 61 73 20 74 68 65 20 73   ┆ g.                  - Has the s┆
0x0580…05a0 61 6d 65 20 6f 62 6a 65 63 74 20 72 65 66 65 72 65 6e 63 65 73 20 61 73 20 74 68 65 20 6f 72 69   ┆ame object references as the ori┆
0x05a0…05c0 67 69 6e 61 6c 20 64 65 73 63 72 69 70 74 6f 72 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ginal descriptor.               ┆
0x05c0…05e0 20 20 20 2d 20 48 61 73 20 74 68 65 20 73 61 6d 65 20 61 63 63 65 73 73 20 6d 6f 64 65 20 28 72   ┆   - Has the same access mode (r┆
0x05e0…0600 65 61 64 2c 20 77 72 69 74 65 2c 20 6f 72 20 72 65 61 64 2f 77 72 69 74 65 20 70 65 72 6d 69 73   ┆ead, write, or read/write permis┆
0x0600…0620 73 69 6f 6e 73 29 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 20 53 68 61 72 65   ┆sions).                  - Share┆
0x0620…0640 73 20 74 68 65 20 73 61 6d 65 20 66 69 6c 65 20 70 6f 69 6e 74 65 72 2c 20 69 66 20 74 68 65 20   ┆s the same file pointer, if the ┆
0x0640…0660 6f 62 6a 65 63 74 20 77 61 73 20 61 20 66 69 6c 65 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆object was a file.              ┆
0x0660…0680 20 20 20 20 2d 20 53 68 61 72 65 73 20 74 68 65 20 73 61 6d 65 20 66 69 6c 65 2d 73 74 61 74 75   ┆    - Shares the same file-statu┆
0x0680…06a0 73 20 66 6c 61 67 73 2e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2d 20 54 68 65 20   ┆s flags.                  - The ┆
0x06a0…06c0 63 6c 6f 73 65 2d 6f 6e 2d 65 78 65 63 20 66 6c 61 67 20 69 73 20 73 65 74 20 74 6f 20 72 65 6d   ┆close-on-exec flag is set to rem┆
0x06c0…06e0 61 69 6e 20 6f 70 65 6e 20 61 63 72 6f 73 73 20 5f 08 65 5f 08 78 5f 08 65 5f 08 63 20 63 61 6c   ┆ain open across _ e_ x_ e_ c cal┆
0x06e0…0700 6c 73 2e 0a 0a 20 20 20 20 20 46 5f 47 45 54 46 44 20 20 20 20 20 47 65 74 20 74 68 65 20 66 69   ┆ls.       F_GETFD     Get the fi┆
0x0700…0720 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 66 6c 61 67 73 20 64 65 66 69 6e 65 64 20 69 6e 0a 20   ┆le descriptor flags defined in  ┆
0x0720…0740 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e   ┆                <f f f fc c c cn┆
0x0740…0760 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 6c 08 6c 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68 08 68   ┆ n n nt t t tl l l l. . . .h h h┆
0x0760…0780 08 68 3e 2c 20 74 68 61 74 20 61 72 65 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 74 68   ┆ h>, that are associated with th┆
0x0780…07a0 65 20 66 69 6c 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74   ┆e file                  descript┆
0x07a0…07c0 6f 72 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 64 5f 08 65 5f 08 73 2e 20 20 46 69 6c 65 20 64 65 73   ┆or _ f_ i_ l_ d_ e_ s.  File des┆
0x07c0…07e0 63 72 69 70 74 6f 72 20 66 6c 61 67 73 20 61 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆criptor flags are               ┆
0x07e0…0800 20 20 20 61 73 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 61 20 73 69 6e 67 6c 65 20 66 69 6c 65   ┆   associated with a single file┆
0x0800…0820 20 64 65 73 63 72 69 70 74 6f 72 20 61 6e 64 20 64 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ descriptor and do              ┆
0x0820…0840 20 20 20 20 6e 6f 74 20 61 66 66 65 63 74 20 6f 74 68 65 72 20 66 69 6c 65 20 64 65 73 63 72 69   ┆    not affect other file descri┆
0x0840…0860 70 74 6f 72 73 20 74 68 61 74 20 72 65 66 65 72 20 74 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20   ┆ptors that refer to             ┆
0x0860…0880 20 20 20 20 20 74 68 65 20 73 61 6d 65 20 66 69 6c 65 2e 0a 0a 20 20 20 20 20 46 5f 53 45 54 46   ┆     the same file.       F_SETF┆
0x0880…08a0 44 20 20 20 20 20 53 65 74 20 74 68 65 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 66 6c   ┆D     Set the file descriptor fl┆
0x08a0…08c0 61 67 73 20 64 65 66 69 6e 65 64 20 69 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ags defined in                  ┆
0x08c0…08e0 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 6c 08 6c   ┆<f f f fc c c cn n n nt t t tl l┆
0x08e0…0900 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 2c 20 74 68 61 74 20 61 72 65 20 61 73   ┆ l l. . . .h h h h>, that are as┆
0x0900…0920 73 6f 63 69 61 74 65 64 20 77 69 74 68 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 64 5f 08 65 5f 08 73   ┆sociated with _ f_ i_ l_ d_ e_ s┆
0x0920…0940 2c 20 74 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 74 68 69 72 64 20   ┆, to                  the third ┆
0x0940…0960 61 72 67 75 6d 65 6e 74 2c 20 5f 08 61 5f 08 72 5f 08 67 2c 20 74 61 6b 65 20 61 73 20 74 79 70   ┆argument, _ a_ r_ g, take as typ┆
0x0960…0980 65 20 69 08 69 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 2e 20 20 49 66 0a 20 20 20   ┆e i i i in n n nt t t t.  If    ┆
0x0980…09a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 46 44 5f 43 4c 4f 45 58 45 43 20 66 6c 61   ┆              the FD_CLOEXEC fla┆
0x09a0…09c0 67 20 69 6e 20 74 68 65 20 74 68 69 72 64 20 61 72 67 75 6d 65 6e 74 20 69 73 0a 20 20 20 20 20   ┆g in the third argument is      ┆
0x09c0…09e0 20 20 20 20 20 20 20 20 20 20 20 20 7a 65 72 6f 20 74 68 65 20 66 69 6c 65 20 77 69 6c 6c 20 72   ┆            zero the file will r┆
0x09e0…0a00 65 6d 61 69 6e 20 6f 70 65 6e 20 61 63 72 6f 73 73 20 74 68 65 20 5f 08 65 5f 08 78 5f 08 65 5f   ┆emain open across the _ e_ x_ e_┆
0x0a00…0a20 08 63 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 75 6e 63 74 69 6f 6e 73 3b 20 6f   ┆ c                  functions; o┆
0x0a20…0a40 74 68 65 72 77 69 73 65 20 74 68 65 20 66 69 6c 65 20 77 69 6c 6c 20 62 65 20 63 6c 6f 73 65 64   ┆therwise the file will be closed┆
0x0a40…0a60 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 70 6f 6e 20 73 75 63 63 65 73 73 66 75   ┆                  upon successfu┆
0x0a60…0a80 6c 20 65 78 65 63 75 74 69 6f 6e 20 6f 66 20 6f 6e 65 20 6f 66 20 74 68 65 20 5f 08 65 5f 08 78   ┆l execution of one of the _ e_ x┆
0x0a80…0aa0 5f 08 65 5f 08 63 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 75 6e 63 74 69 6f 6e   ┆_ e_ c                  function┆
0x0aa0…0ac0 73 2e 0a 0a 20 20 20 20 20 46 5f 47 45 54 46 4c 20 20 20 20 20 47 65 74 20 5f 08 66 5f 08 69 5f   ┆s.       F_GETFL     Get _ f_ i_┆
0x0ac0…0ae0 08 6c 5f 08 64 5f 08 65 5f 08 73 20 73 74 61 74 75 73 20 66 6c 61 67 73 2c 20 61 73 20 64 65 73   ┆ l_ d_ e_ s status flags, as des┆
0x0ae0…0b00 63 72 69 62 65 64 20 62 65 6c 6f 77 2e 0a 0a 20 20 20 20 20 46 5f 53 45 54 46 4c 20 20 20 20 20   ┆cribed below.       F_SETFL     ┆
0x0b00…0b20 53 65 74 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 64 5f 08 65 5f 08 73 20 73 74 61 74 75 73 20 66 6c   ┆Set _ f_ i_ l_ d_ e_ s status fl┆
0x0b20…0b40 61 67 73 20 74 6f 20 5f 08 61 5f 08 72 5f 08 67 2c 20 61 73 20 64 65 73 63 72 69 62 65 64 0a 20   ┆ags to _ a_ r_ g, as described  ┆
0x0b40…0b60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 65 6c 6f 77 0a 0a 20 20 20 20 20 46 5f 47 45   ┆                below       F_GE┆
0x0b60…0b80 54 4f 57 4e 20 20 20 20 47 65 74 20 74 68 65 20 70 72 6f 63 65 73 73 20 49 08 49 08 49 08 49 44   ┆TOWN    Get the process I I I ID┆
0x0b80…0ba0 08 44 08 44 08 44 20 28 70 69 64 29 20 6f 72 20 67 72 6f 75 70 20 63 75 72 72 65 6e 74 6c 79 0a   ┆ D D D (pid) or group currently ┆
0x0ba0…0bc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 63 65 69 76 69 6e 67 20 53 49 47 49 4f   ┆                 receiving SIGIO┆
0x0bc0…0be0 20 61 6e 64 20 53 49 47 55 52 47 20 73 69 67 6e 61 6c 73 2e 20 20 50 72 6f 63 65 73 73 0a 20 20   ┆ and SIGURG signals.  Process   ┆
0x0be0…0c00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 72 6f 75 70 73 20 61 72 65 20 72 65 74 75 72 6e   ┆               groups are return┆
0x0c00…0c20 65 64 20 61 73 20 6e 65 67 61 74 69 76 65 20 76 61 6c 75 65 73 2e 0a 0a 20 20 20 20 20 46 5f 53   ┆ed as negative values.       F_S┆
0x0c20…0c40 45 54 4f 57 4e 20 20 20 20 53 65 74 20 74 68 65 20 70 72 6f 63 65 73 73 20 6f 72 20 70 72 6f 63   ┆ETOWN    Set the process or proc┆
0x0c40…0c60 65 73 73 20 67 72 6f 75 70 20 74 6f 20 72 65 63 65 69 76 65 0a 20 20 20 20 20 20 20 20 20 20 20   ┆ess group to receive            ┆
0x0c60…0c80 20 20 20 20 20 20 53 49 47 49 4f 20 61 6e 64 20 53 49 47 55 52 47 20 73 69 67 6e 61 6c 73 2e 20   ┆      SIGIO and SIGURG signals. ┆
0x0c80…0ca0 20 50 72 6f 63 65 73 73 20 67 72 6f 75 70 73 20 61 72 65 0a 20 20 20 20 20 20 20 20 20 20 20 20   ┆ Process groups are             ┆
0x0ca0…0cc0 20 20 20 20 20 73 70 65 63 69 66 69 65 64 20 62 79 20 73 70 65 63 69 66 79 69 6e 67 20 5f 08 61   ┆     specified by specifying _ a┆
0x0cc0…0ce0 5f 08 72 5f 08 67 20 61 73 20 6e 65 67 61 74 69 76 65 2c 20 6f 74 68 65 72 2d 0a 20 20 20 20 20   ┆_ r_ g as negative, other-      ┆
0x0ce0…0d00 20 20 20 20 20 20 20 20 20 20 20 20 77 69 73 65 20 5f 08 61 5f 08 72 5f 08 67 20 69 73 20 69 6e   ┆            wise _ a_ r_ g is in┆
0x0d00…0d20 74 65 72 70 72 65 74 65 64 20 61 73 20 61 20 70 72 6f 63 65 73 73 20 49 08 49 08 49 08 49 44 08   ┆terpreted as a process I I I ID ┆
0x0d20…0d40 44 08 44 08 44 2e 0a 0a 20 20 20 20 20 54 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 63 6f 6d 6d 61   ┆D D D.       The following comma┆
0x0d40…0d60 6e 64 73 20 61 72 65 20 75 73 65 64 20 66 6f 72 20 72 65 63 6f 72 64 2d 6c 6f 63 6b 69 6e 67 2e   ┆nds are used for record-locking.┆
0x0d60…0d80 20 20 4c 6f 63 6b 73 0a 20 20 20 20 20 6d 61 79 20 62 65 20 70 6c 61 63 65 64 20 6f 6e 20 61 6e   ┆  Locks      may be placed on an┆
0x0d80…0da0 20 65 6e 74 69 72 65 20 66 69 6c 65 20 6f 72 20 73 65 67 6d 65 6e 74 73 20 6f 66 20 61 20 66 69   ┆ entire file or segments of a fi┆
0x0da0…0dc0 6c 65 2e 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 46 5f 47 45 54 4c 4b 20 20 20 20 20 47 65 74 20 74   ┆le.            F_GETLK     Get t┆
0x0dc0…0de0 68 65 20 66 69 72 73 74 20 6c 6f 63 6b 20 77 68 69 63 68 20 62 6c 6f 63 6b 73 20 74 68 65 20 6c   ┆he first lock which blocks the l┆
0x0de0…0e00 6f 63 6b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e   ┆ock                  description┆
0x0e00…0e20 20 67 69 76 65 6e 20 62 79 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 6f 66 20 74 79 70 65 20 73   ┆ given by the variable of type s┆
0x0e20…0e40 08 73 08 73 08 73 74 08 74 08 74 08 74 72 08 72 08 72 08 72 75 08 75 08 75 08 75 63 08 63 08 63   ┆ s s st t t tr r r ru u u uc c c┆
0x0e40…0e60 08 63 74 08 74 08 74 08 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 08 66 08 66   ┆ ct t t t                  f f f┆
0x0e60…0e80 08 66 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 28   ┆ fl l l lo o o oc c c ck k k k (┆
0x0e80…0ea0 73 65 65 20 62 65 6c 6f 77 29 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20 5f 08 61 5f 08 72 5f   ┆see below) pointed to by _ a_ r_┆
0x0ea0…0ec0 08 67 2e 20 54 68 65 20 69 6e 66 6f 72 2d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ g. The infor-                  ┆
0x0ec0…0ee0 6d 61 74 69 6f 6e 20 72 65 74 72 69 65 76 65 64 20 6f 76 65 72 77 72 69 74 65 72 73 20 74 68 65   ┆mation retrieved overwriters the┆
0x0ee0…0f00 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 61   ┆ information                  pa┆
0x0f00…0f20 73 73 65 64 20 74 6f 20 5f 08 66 5f 08 63 5f 08 6e 5f 08 74 5f 08 6c 20 69 6e 20 74 68 65 20 73   ┆ssed to _ f_ c_ n_ t_ l in the s┆
0x0f20…0f40 74 72 75 63 74 75 72 65 20 66 08 66 08 66 08 66 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08   ┆tructure f f f fl l l lo o o oc ┆
0x0f40…0f60 63 08 63 08 63 6b 08 6b 08 6b 08 6b 2e 20 49 66 20 6e 6f 0a 20 20 20 20 20 20 20 20 20 20 20 20   ┆c c ck k k k. If no             ┆
0x0f60…0f80 20 20 20 20 20 6c 6f 63 6b 20 69 73 20 66 6f 75 6e 64 20 74 68 61 74 20 77 6f 75 6c 64 20 70 72   ┆     lock is found that would pr┆
0x0f80…0fa0 65 76 65 6e 74 20 74 68 69 73 20 6c 6f 63 6b 20 66 6f 72 6d 0a 20 20 20 20 20 20 20 20 20 20 20   ┆event this lock form            ┆
0x0fa0…0fc0 20 20 20 20 20 20 62 65 69 6e 67 20 63 72 65 61 74 65 64 2c 20 74 68 65 6e 20 74 68 65 20 73 74   ┆      being created, then the st┆
0x0fc0…0fe0 72 75 63 74 75 72 65 20 69 73 20 70 61 73 73 65 64 20 62 61 63 6b 0a 20 20 20 20 20 20 20 20 20   ┆ructure is passed back          ┆
0x0fe0…1000 20 20 20 20 20 20 20 20 75 6e 63 68 61 6e 67 65 64 20 65 78 63 65 70 74 20 66 6f 72 20 74 68 65   ┆        unchanged except for the┆
0x1000…1020 20 6c 6f 63 6b 20 74 79 70 65 20 77 68 69 63 68 20 77 69 6c 6c 20 62 65 0a 20 20 20 20 20 20 20   ┆ lock type which will be        ┆
0x1020…1040 20 20 20 20 20 20 20 20 20 20 73 65 74 20 74 6f 20 46 5f 55 4e 4c 43 4b 2e 0a 0a 20 20 20 20 20   ┆          set to F_UNLCK.       ┆
0x1040…1060 46 5f 53 45 54 4c 4b 20 20 20 20 20 53 65 74 20 6f 72 20 63 6c 65 61 72 20 61 20 66 69 6c 65 20   ┆F_SETLK     Set or clear a file ┆
0x1060…1080 73 65 67 6d 65 6e 74 20 6c 6f 63 6b 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 0a 20 20 20 20 20 20   ┆segment lock according to       ┆
0x1080…10a0 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 76 61 72 69 61 62 6c 65 20 6f 66 20 74 79 70 65 20   ┆           the variable of type ┆
0x10a0…10c0 73 08 73 08 73 08 73 74 08 74 08 74 08 74 72 08 72 08 72 08 72 75 08 75 08 75 08 75 63 08 63 08   ┆s s s st t t tr r r ru u u uc c ┆
0x10c0…10e0 63 08 63 74 08 74 08 74 08 74 20 66 08 66 08 66 08 66 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f   ┆c ct t t t f f f fl l l lo o o o┆
0x10e0…1100 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 28 73 65 65 20 62 65 6c 6f 77 29 0a 20 20 20 20 20   ┆c c c ck k k k (see below)      ┆
0x1100…1120 20 20 20 20 20 20 20 20 20 20 20 20 70 6f 69 6e 74 65 64 20 74 6f 20 62 79 20 5f 08 61 5f 08 72   ┆            pointed to by _ a_ r┆
0x1120…1140 5f 08 67 2e 20 46 5f 53 45 54 4c 4b 20 69 73 20 75 73 65 64 20 74 6f 20 65 73 74 61 62 6c 69 73   ┆_ g. F_SETLK is used to establis┆
0x1140…1160 68 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 61 64 20 28 46 5f 52 44 4c 43 4b   ┆h                  read (F_RDLCK┆
0x1160…1180 29 20 61 6e 64 20 77 72 69 74 65 20 28 46 5f 57 52 4c 43 4b 29 20 6c 6f 63 6b 73 2c 20 61 73 0a   ┆) and write (F_WRLCK) locks, as ┆
0x1180…11a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 65 6c 6c 20 61 73 20 72 65 6d 6f 76 65 20   ┆                 well as remove ┆
0x11a0…11c0 65 69 74 68 65 72 20 74 79 70 65 20 6f 66 20 6c 6f 63 6b 20 28 46 5f 55 4e 4c 43 4b 29 2e 0a 20   ┆either type of lock (F_UNLCK).  ┆
0x11c0…11e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 46 5f 52 44 4c 43 4b 2c 20 46 5f 57 52 4c 43 4b   ┆                F_RDLCK, F_WRLCK┆
0x11e0…1200 2c 20 61 6e 64 20 46 5f 55 4e 4c 43 4b 20 61 72 65 20 64 65 66 69 6e 65 64 20 62 79 20 74 68 65   ┆, and F_UNLCK are defined by the┆
0x1200…1220 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 3c 66 08 66 08 66 08 66 63 08 63 08 63 08   ┆                  <f f f fc c c ┆
0x1220…1240 63 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 6c 08 6c 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68   ┆cn n n nt t t tl l l l. . . .h h┆
0x1240…1260 08 68 08 68 3e 20 68 65 61 64 65 72 20 66 69 6c 65 2e 20 49 66 20 61 20 72 65 61 64 20 6f 72 20   ┆ h h> header file. If a read or ┆
0x1260…1280 77 72 69 74 65 20 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 6e 6e   ┆write lock                  cann┆
0x1280…12a0 6f 74 20 62 65 20 73 65 74 2c 20 5f 08 66 5f 08 63 5f 08 6e 5f 08 74 5f 08 6c 20 77 69 6c 6c 20   ┆ot be set, _ f_ c_ n_ t_ l will ┆
0x12a0…12c0 72 65 74 75 72 6e 20 69 6d 6d 65 64 69 61 74 65 6c 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆return immediately              ┆
0x12c0…12e0 20 20 20 20 77 69 74 68 20 61 6e 20 65 72 72 6f 72 20 76 61 6c 75 65 20 6f 66 20 2d 31 2e 0a 0a   ┆    with an error value of -1.  ┆
0x12e0…1300 20 20 20 20 20 46 5f 53 45 54 4c 4b 57 20 20 20 20 54 68 69 73 20 63 6f 6d 6d 61 6e 64 20 69 73   ┆     F_SETLKW    This command is┆
0x1300…1320 20 74 68 65 20 73 61 6d 65 20 61 73 20 46 5f 53 45 54 4c 4b 20 65 78 63 65 70 74 20 74 68 61 74   ┆ the same as F_SETLK except that┆
0x1320…1340 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 61 20 72 65 61 64 20 6f 72 20 77   ┆                  if a read or w┆
0x1340…1360 72 69 74 65 20 6c 6f 63 6b 20 69 73 20 62 6c 6f 63 6b 65 64 20 62 79 20 6f 74 68 65 72 0a 20 20   ┆rite lock is blocked by other   ┆
0x1360…1380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 6c 6f 63 6b 73 2c 20 74 68 65 20 70 72 6f 63 65 73   ┆               locks, the proces┆
0x1380…13a0 73 20 77 69 6c 6c 20 73 6c 65 65 70 20 75 6e 74 69 6c 20 74 68 65 20 73 65 67 6d 65 6e 74 0a 20   ┆s will sleep until the segment  ┆
0x13a0…13c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 73 20 66 72 65 65 20 74 6f 20 62 65 20 62 6c   ┆                is free to be bl┆
0x13c0…13e0 6f 63 6b 65 64 2e 0a 0a 20 20 20 20 20 54 68 65 20 73 74 72 75 63 74 75 72 65 20 66 08 66 08 66   ┆ocked.       The structure f f f┆
0x13e0…1400 08 66 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 63 08 63 08 63 08 63 6b 08 6b 08 6b 08 6b 20 64   ┆ fl l l lo o o oc c c ck k k k d┆
0x1400…1420 65 66 69 6e 65 64 20 62 79 20 74 68 65 20 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e 08 6e   ┆efined by the <f f f fc c c cn n┆
0x1420…1440 08 6e 08 6e 74 08 74 08 74 08 74 6c 08 6c 08 6c 08 6c 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68   ┆ n nt t t tl l l l. . . .h h h h┆
0x1440…1460 3e 20 68 65 61 64 65 72 20 66 69 6c 65 0a 20 20 20 20 20 64 65 73 63 72 69 62 65 73 20 61 20 6c   ┆> header file      describes a l┆
0x1460…1480 6f 63 6b 2e 20 49 74 20 64 65 73 63 72 69 62 65 73 20 74 68 65 20 74 79 70 65 20 28 5f 08 6c 5f   ┆ock. It describes the type (_ l_┆
0x1480…14a0 5f 08 74 5f 08 79 5f 08 70 5f 08 65 29 2c 20 73 74 61 72 74 69 6e 67 0a 20 20 20 20 20 6f 66 66   ┆_ t_ y_ p_ e), starting      off┆
0x14a0…14c0 73 65 74 20 28 5f 08 6c 5f 5f 08 77 5f 08 68 5f 08 65 5f 08 6e 5f 08 63 5f 08 65 29 2c 20 72 65   ┆set (_ l__ w_ h_ e_ n_ c_ e), re┆
0x14c0…14e0 6c 61 74 69 76 65 20 6f 66 66 73 65 74 20 28 5f 08 6c 5f 5f 08 73 5f 08 74 5f 08 61 5f 08 72 5f   ┆lative offset (_ l__ s_ t_ a_ r_┆
0x14e0…1500 08 74 29 2c 20 73 69 7a 65 20 28 5f 08 6c 5f 5f 08 6c 5f 08 65 5f 08 6e 29 2c 0a 20 20 20 20 20   ┆ t), size (_ l__ l_ e_ n),      ┆
0x1500…1520 61 6e 64 20 70 72 6f 63 65 73 73 2d 49 44 20 28 5f 08 6c 5f 5f 08 70 5f 08 69 5f 08 64 29 3a 0a   ┆and process-ID (_ l__ p_ i_ d): ┆
0x1520…1540 0a 20 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 6c 5f 74 79 70 65 3b 20 20 20 20 20 20   ┆           short   l_type;      ┆
0x1540…1560 20 20 20 2f 2a 20 46 5f 52 44 4c 43 4b 2c 20 46 5f 57 52 4c 43 4b 2c 20 46 5f 55 4e 4c 43 4b 20   ┆   /* F_RDLCK, F_WRLCK, F_UNLCK ┆
0x1560…1580 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 6c 5f 77 68 65 6e 63 65 3b 20 20   ┆*/           short   l_whence;  ┆
0x1580…15a0 20 20 20 20 20 2f 2a 20 66 6c 61 67 20 66 6f 72 20 73 74 61 72 74 69 6e 67 20 6f 66 66 73 65 74   ┆     /* flag for starting offset┆
0x15a0…15c0 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 6f 66 66 5f 74 20 20 20 6c 5f 73 74 61 72 74 3b 20 20   ┆ */           off_t   l_start;  ┆
0x15c0…15e0 20 20 20 20 20 20 2f 2a 20 72 65 6c 61 74 69 76 65 20 6f 66 66 73 65 74 20 69 6e 20 62 79 74 65   ┆      /* relative offset in byte┆
0x15e0…1600 73 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 6f 66 66 5f 74 20 20 20 6c 5f 6c 65 6e 3b 20 20 20   ┆s */           off_t   l_len;   ┆
0x1600…1620 20 20 20 20 20 20 20 2f 2a 20 69 66 20 30 20 74 68 65 6e 20 75 6e 74 69 6c 20 45 4f 46 20 2a 2f   ┆       /* if 0 then until EOF */┆
0x1620…1640 0a 20 20 20 20 20 20 20 20 20 20 70 69 64 5f 74 20 20 20 6c 5f 70 69 64 3b 20 20 20 20 20 20 20   ┆           pid_t   l_pid;       ┆
0x1640…1660 20 20 20 2f 2a 20 72 65 74 75 72 6e 65 64 20 77 69 74 68 20 46 5f 47 45 54 4c 4b 20 2a 2f 0a 0a   ┆   /* returned with F_GETLK */  ┆
0x1660…1680 20 20 20 20 20 57 68 65 6e 20 61 20 72 65 61 64 2d 6c 6f 63 6b 20 68 61 73 20 62 65 65 6e 20 73   ┆     When a read-lock has been s┆
0x1680…16a0 65 74 20 6f 6e 20 61 20 73 65 67 6d 65 6e 74 20 6f 66 20 61 20 66 69 6c 65 2c 20 6f 74 68 65 72   ┆et on a segment of a file, other┆
0x16a0…16c0 0a 20 20 20 20 20 70 72 6f 63 65 73 73 65 73 20 6d 61 79 20 61 6c 73 6f 20 73 65 74 20 72 65 61   ┆      processes may also set rea┆
0x16c0…16e0 64 2d 6c 6f 63 6b 73 20 6f 6e 20 74 68 61 74 20 73 65 67 6d 65 6e 74 20 6f 72 20 61 20 70 6f 72   ┆d-locks on that segment or a por┆
0x16e0…1700 2d 0a 20 20 20 20 20 74 69 6f 6e 20 6f 66 20 69 74 2e 20 41 20 72 65 61 64 2d 6c 6f 63 6b 20 70   ┆-      tion of it. A read-lock p┆
0x1700…1720 72 65 76 65 6e 74 73 20 61 6e 79 20 6f 74 68 65 72 20 70 72 6f 63 65 73 73 20 66 72 6f 6d 20 73   ┆revents any other process from s┆
0x1720…1740 65 74 2d 0a 20 20 20 20 20 74 69 6e 67 20 61 20 77 72 69 74 65 2d 6c 6f 63 6b 20 6f 6e 20 61 6e   ┆et-      ting a write-lock on an┆
0x1740…1760 79 20 70 6f 72 74 69 6f 6e 20 6f 66 20 74 68 65 20 70 72 6f 74 65 63 74 65 64 20 61 72 65 61 2e   ┆y portion of the protected area.┆
0x1760…1780 20 54 68 65 0a 20 20 20 20 20 66 69 6c 65 2d 64 65 73 63 72 69 70 74 6f 72 20 6f 6e 20 77 68 69   ┆ The      file-descriptor on whi┆
0x1780…17a0 63 68 20 61 20 72 65 61 64 2d 6c 6f 63 6b 20 69 73 20 62 65 69 6e 67 20 70 6c 61 63 65 64 20 6d   ┆ch a read-lock is being placed m┆
0x17a0…17c0 75 73 74 0a 20 20 20 20 20 68 61 76 65 20 62 65 65 6e 20 6f 70 65 6e 65 64 20 77 69 74 68 20 61   ┆ust      have been opened with a┆
0x17c0…17e0 20 72 65 61 64 2d 70 72 6f 63 65 73 73 2e 0a 0a 20 20 20 20 20 41 20 77 72 69 74 65 2d 6c 6f 63   ┆ read-process.       A write-loc┆
0x17e0…1800 6b 20 70 72 65 76 65 6e 74 73 20 61 6e 79 20 6f 74 68 65 72 20 70 72 6f 63 65 73 73 20 66 72 6f   ┆k prevents any other process fro┆
0x1800…1820 6d 20 73 65 74 74 69 6e 67 20 61 0a 20 20 20 20 20 72 65 61 64 2d 6c 6f 63 6b 20 6f 72 20 61 20   ┆m setting a      read-lock or a ┆
0x1820…1840 77 72 69 74 65 2d 6c 6f 63 6b 20 6f 6e 20 61 6e 79 20 70 6f 72 74 69 6f 6e 20 6f 66 20 74 68 65   ┆write-lock on any portion of the┆
0x1840…1860 20 70 72 6f 74 65 63 74 65 64 0a 20 20 20 20 20 61 72 65 61 2e 20 4f 6e 6c 79 20 6f 6e 65 20 77   ┆ protected      area. Only one w┆
0x1860…1880 72 69 74 65 2d 6c 6f 63 6b 20 61 6e 64 20 6e 6f 20 72 65 61 64 2d 6c 6f 63 6b 73 20 6d 61 79 20   ┆rite-lock and no read-locks may ┆
0x1880…18a0 65 78 69 73 74 20 66 6f 72 20 61 0a 20 20 20 20 20 67 69 76 65 6e 20 73 65 67 6d 65 6e 74 20 6f   ┆exist for a      given segment o┆
0x18a0…18c0 66 20 61 20 66 69 6c 65 20 61 74 20 61 20 67 69 76 65 6e 20 74 69 6d 65 2e 20 54 68 65 20 66 69   ┆f a file at a given time. The fi┆
0x18c0…18e0 6c 65 2d 64 65 73 63 72 69 70 74 6f 72 0a 20 20 20 20 20 6f 6e 20 77 68 69 63 68 20 61 20 77 72   ┆le-descriptor      on which a wr┆
0x18e0…1900 69 74 65 2d 6c 6f 63 6b 20 69 73 20 62 65 69 6e 67 20 70 6c 61 63 65 64 20 6d 75 73 74 20 68 61   ┆ite-lock is being placed must ha┆
0x1900…1920 76 65 20 62 65 65 6e 20 6f 70 65 6e 65 64 0a 20 20 20 20 20 77 69 74 68 20 61 20 77 72 69 74 65   ┆ve been opened      with a write┆
[…truncated at 200 lines…]