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: o

⟦771b30e93⟧

    Length: 20436 (0x4fd4)
    Names: »open.2«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/man/cat2/open.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 20 6f 70 65 6e 28 32 29 0a 0a 0a 0a   ┆s                    open(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 6f 70 65 6e 20 2d 20 6f 70 65 6e 20 61 6e 20 65 78 69 73 74 69 6e 67 20 66 69 6c 65 20 6f   ┆  open - open an existing file o┆
0x00a0…00c0 72 20 63 72 65 61 74 65 20 61 20 66 69 6c 65 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e   ┆r create a file  S S S SY Y Y YN┆
0x00c0…00e0 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 08 58 0a 20 20 20 20   ┆ N N NT T T TA A A AX X X X     ┆
0x00e0…0100 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 08 63 6c 08 6c   ┆ # # # #i i i in n n nc c c cl l┆
0x0100…0120 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 08 3c 08 3c 08   ┆ l lu u u ud d d de e e e < < < ┆
0x0120…0140 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 08 2f 74 08 74   ┆<s s s sy y y ys s s s/ / / /t t┆
0x0140…0160 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 73 08 73 08 73   ┆ t ty y y yp p p pe e e es s s s┆
0x0160…0180 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 23 08 23 08 23   ┆. . . .h h h h> > > >      # # #┆
0x0180…01a0 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 6c 08 6c 75 08   ┆ #i i i in n n nc c c cl l l lu ┆
0x01a0…01c0 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 73 08 73 08 73   ┆u u ud d d de e e e < < < <s s s┆
0x01c0…01e0 08 73 79 08 79 08 79 08 79 73 08 73 08 73 08 73 2f 08 2f 08 2f 08 2f 73 08 73 08 73 08 73 74 08   ┆ sy y y ys s s s/ / / /s s s st ┆
0x01e0…0200 74 08 74 08 74 61 08 61 08 61 08 61 74 08 74 08 74 08 74 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08   ┆t t ta a a at t t t. . . .h h h ┆
0x0200…0220 68 3e 08 3e 08 3e 08 3e 0a 20 20 20 20 20 23 08 23 08 23 08 23 69 08 69 08 69 08 69 6e 08 6e 08   ┆h> > > >      # # # #i i i in n ┆
0x0220…0240 6e 08 6e 63 08 63 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   ┆n nc c c cl l l lu u u ud d d de┆
0x0240…0260 08 65 08 65 08 65 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   ┆ e e e < < < <f f f fc c c cn n ┆
0x0260…0280 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 3e   ┆n nt t t tl l l l. . . .h h h h>┆
0x0280…02a0 08 3e 08 3e 08 3e 0a 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   ┆ > > >       i i i in n n nt t t┆
0x02a0…02c0 08 74 20 6f 08 6f 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 65 6e 08 6e 08 6e 08 6e 28   ┆ t o o o op p p pe e e en n n n(┆
0x02c0…02e0 08 28 08 28 08 28 70 08 70 08 70 08 70 61 08 61 08 61 08 61 74 08 74 08 74 08 74 68 08 68 08 68   ┆ ( ( (p p p pa a a at t t th h h┆
0x02e0…0300 08 68 2c 08 2c 08 2c 08 2c 20 66 08 66 08 66 08 66 6c 08 6c 08 6c 08 6c 61 08 61 08 61 08 61 67   ┆ h, , , , f f f fl l l la a a ag┆
0x0300…0320 08 67 08 67 08 67 73 08 73 08 73 08 73 2c 08 2c 08 2c 08 2c 20 2e 08 2e 08 2e 08 2e 2e 08 2e 08   ┆ g g gs s s s, , , , . . . .. . ┆
0x0320…0340 2e 08 2e 2e 08 2e 08 2e 08 2e 29 08 29 08 29 08 29 0a 20 20 20 20 20 63 08 63 08 63 08 63 68 08   ┆. .. . . .) ) ) )      c c c ch ┆
0x0340…0360 68 08 68 08 68 61 08 61 08 61 08 61 72 08 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 70 08 70 08 70   ┆h h ha a a ar r r r * * * *p p p┆
0x0360…0380 08 70 61 08 61 08 61 08 61 74 08 74 08 74 08 74 68 08 68 08 68 08 68 3b 08 3b 08 3b 08 3b 0a 20   ┆ pa a a at t t th h h h; ; ; ;  ┆
0x0380…03a0 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 66 08   ┆    i i i in n n nt t t t f f f ┆
0x03a0…03c0 66 6c 08 6c 08 6c 08 6c 61 08 61 08 61 08 61 67 08 67 08 67 08 67 73 08 73 08 73 08 73 3b 08 3b   ┆fl l l la a a ag g g gs s s s; ;┆
0x03c0…03e0 08 3b 08 3b 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 08 53 08 53 08 53 43 08 43 08 43   ┆ ; ;  D D D DE E E ES S S SC C C┆
0x03e0…0400 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 08 50 54 08 54 08 54 08 54 49 08   ┆ CR R R RI I I IP P P PT T T TI ┆
0x0400…0420 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 54 68 65 20 5f 08 6f   ┆I I IO O O ON N N N      The _ o┆
0x0420…0440 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66 75 6e 63 74 69 6f 6e 20 65 73 74 61 62 6c 69 73 68 65 73   ┆_ p_ e_ n() function establishes┆
0x0440…0460 20 74 68 65 20 63 6f 6e 6e 65 63 74 69 6f 6e 20 62 65 74 77 65 65 6e 20 61 0a 20 20 20 20 20 66   ┆ the connection between a      f┆
0x0460…0480 69 6c 65 20 61 6e 64 20 61 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 2e 20 20 49 74 20 63   ┆ile and a file descriptor.  It c┆
0x0480…04a0 72 65 61 74 65 73 20 61 6e 20 6f 70 65 6e 20 66 69 6c 65 0a 20 20 20 20 20 64 65 73 63 72 69 70   ┆reates an open file      descrip┆
0x04a0…04c0 74 69 6f 6e 20 74 68 61 74 20 72 65 66 65 72 73 20 74 6f 20 61 20 66 69 6c 65 20 61 6e 64 20 61   ┆tion that refers to a file and a┆
0x04c0…04e0 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 74 68 61 74 0a 20 20 20 20 20 72 65 66 65 72   ┆ file descriptor that      refer┆
0x04e0…0500 73 20 74 6f 20 74 68 61 74 20 6f 70 65 6e 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 69 6f 6e 2e   ┆s to that open file description.┆
0x0500…0520 20 54 68 65 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 0a 20 20 20 20 20 69 73 20 75 73 65   ┆ The file descriptor      is use┆
0x0520…0540 64 20 62 79 20 6f 74 68 65 72 20 49 2f 4f 20 66 75 6e 63 74 69 6f 6e 73 20 74 6f 20 72 65 66 65   ┆d by other I/O functions to refe┆
0x0540…0560 72 20 74 6f 20 74 68 65 20 66 69 6c 65 2e 20 20 54 68 65 0a 20 20 20 20 20 5f 08 70 5f 08 61 5f   ┆r to the file.  The      _ p_ a_┆
0x0560…0580 08 74 5f 08 68 20 61 72 67 75 6d 65 6e 74 20 70 6f 69 6e 74 73 20 74 6f 20 61 20 70 61 74 68 6e   ┆ t_ h argument points to a pathn┆
0x0580…05a0 61 6d 65 20 6e 61 6d 69 6e 67 20 74 68 65 20 66 69 6c 65 2e 20 49 74 20 69 73 20 61 0a 20 20 20   ┆ame naming the file. It is a    ┆
0x05a0…05c0 20 20 73 74 61 6e 64 61 72 64 20 43 20 73 74 72 69 6e 67 20 28 6e 75 6c 6c 2d 74 65 72 6d 69 6e   ┆  standard C string (null-termin┆
0x05c0…05e0 61 74 65 64 20 41 53 43 49 49 20 63 68 61 72 61 63 74 65 72 73 29 2e 20 53 69 6e 63 65 0a 20 20   ┆ated ASCII characters). Since   ┆
0x05e0…0600 20 20 20 54 58 20 73 75 70 70 6f 72 74 73 20 61 20 64 69 73 74 72 69 62 75 74 65 64 20 66 69 6c   ┆   TX supports a distributed fil┆
0x0600…0620 65 20 73 79 73 74 65 6d 2c 20 74 68 65 20 70 61 74 68 6e 61 6d 65 20 63 61 6e 0a 20 20 20 20 20   ┆e system, the pathname can      ┆
0x0620…0640 69 6e 64 69 63 61 74 65 20 61 20 66 69 6c 65 20 6f 6e 20 61 6e 6f 74 68 65 72 20 50 55 2e 0a 0a   ┆indicate a file on another PU.  ┆
0x0640…0660 20 20 20 20 20 54 68 65 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66 75 6e 63 74 69 6f 6e   ┆     The _ o_ p_ e_ n() function┆
0x0660…0680 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 61 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 66   ┆ will return a file descriptor f┆
0x0680…06a0 6f 72 20 74 68 65 0a 20 20 20 20 20 6e 61 6d 65 64 20 66 69 6c 65 20 74 68 61 74 20 69 73 20 74   ┆or the      named file that is t┆
0x06a0…06c0 68 65 20 6c 6f 77 65 73 74 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 20 6e 6f 74 20 63 75   ┆he lowest file descriptor not cu┆
0x06c0…06e0 72 72 65 6e 74 6c 79 0a 20 20 20 20 20 6f 70 65 6e 20 66 6f 72 20 74 68 61 74 20 70 72 6f 63 65   ┆rrently      open for that proce┆
0x06e0…0700 73 73 2e 20 54 68 65 20 6f 70 65 6e 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 69 6f 6e 20 69 73   ┆ss. The open file description is┆
0x0700…0720 20 6e 65 77 2c 20 61 6e 64 0a 20 20 20 20 20 74 68 65 72 65 66 6f 72 65 20 74 68 65 20 66 69 6c   ┆ new, and      therefore the fil┆
0x0720…0740 65 20 64 65 73 63 72 69 70 74 6f 72 20 64 6f 65 73 20 6e 6f 74 20 73 68 61 72 65 20 69 74 20 77   ┆e descriptor does not share it w┆
0x0740…0760 69 74 68 20 61 6e 79 0a 20 20 20 20 20 6f 74 68 65 72 20 70 72 6f 63 65 73 73 20 69 6e 20 74 68   ┆ith any      other process in th┆
0x0760…0780 65 20 73 79 73 74 65 6d 2e 20 54 68 65 20 6e 65 77 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f   ┆e system. The new file descripto┆
0x0780…07a0 72 20 69 73 20 73 65 74 0a 20 20 20 20 20 74 6f 20 72 65 6d 61 69 6e 20 6f 70 65 6e 20 61 63 72   ┆r is set      to remain open acr┆
0x07a0…07c0 6f 73 73 20 74 68 65 20 5f 08 65 5f 08 78 5f 08 65 5f 08 63 20 66 75 6e 63 74 69 6f 6e 73 2c 20   ┆oss the _ e_ x_ e_ c functions, ┆
0x07c0…07e0 73 65 65 20 5f 08 66 5f 08 63 5f 08 6e 5f 08 74 5f 08 6c 28 29 2e 0a 0a 20 20 20 20 20 54 68 65   ┆see _ f_ c_ n_ t_ l().       The┆
0x07e0…0800 20 66 69 6c 65 20 6f 66 66 73 65 74 20 75 73 65 64 20 74 6f 20 6d 61 72 6b 20 74 68 65 20 63 75   ┆ file offset used to mark the cu┆
0x0800…0820 72 72 65 6e 74 20 70 6f 73 69 74 69 6f 6e 20 77 69 74 68 69 6e 20 74 68 65 0a 20 20 20 20 20 66   ┆rrent position within the      f┆
0x0820…0840 69 6c 65 20 69 73 20 73 65 74 20 74 6f 20 74 68 65 20 62 65 67 69 6e 6e 69 6e 67 20 6f 66 20 74   ┆ile is set to the beginning of t┆
0x0840…0860 68 65 20 66 69 6c 65 2e 0a 0a 20 20 20 20 20 54 68 69 73 20 63 61 6c 6c 20 69 73 20 61 75 74 6f   ┆he file.       This call is auto┆
0x0860…0880 6d 61 74 69 63 61 6c 6c 79 20 72 65 73 74 61 72 74 65 64 20 69 66 20 69 6e 74 65 72 72 75 70 74   ┆matically restarted if interrupt┆
0x0880…08a0 65 64 20 66 6f 72 20 73 69 67 2d 0a 20 20 20 20 20 6e 61 6c 20 64 65 6c 69 76 65 72 79 2c 20 75   ┆ed for sig-      nal delivery, u┆
0x08a0…08c0 6e 6c 65 73 73 20 74 68 65 20 70 72 6f 63 65 73 73 20 65 69 74 68 65 72 20 68 61 73 20 61 20 73   ┆nless the process either has a s┆
0x08c0…08e0 69 67 6e 61 6c 20 68 61 6e 64 6c 65 72 0a 20 20 20 20 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 73   ┆ignal handler      that does nos┆
0x08e0…0900 20 72 65 74 75 72 6e 20 6e 6f 72 6d 61 6c 6c 79 2c 20 6f 74 20 68 61 73 20 75 73 65 64 20 74 68   ┆ return normally, ot has used th┆
0x0900…0920 65 20 5f 08 73 5f 08 69 5f 08 67 5f 08 73 5f 08 65 5f 08 74 5f 08 6d 5f 08 6f 5f 08 64 5f 08 65   ┆e _ s_ i_ g_ s_ e_ t_ m_ o_ d_ e┆
0x0920…0940 28 29 0a 20 20 20 20 20 63 61 6c 6c 20 74 6f 20 62 6c 6f 63 6b 20 74 68 65 20 72 65 73 74 61 72   ┆()      call to block the restar┆
0x0940…0960 74 20 61 74 74 65 6d 70 74 2e 0a 0a 20 20 20 20 20 54 68 65 20 66 69 6c 65 20 73 74 61 74 75 73   ┆t attempt.       The file status┆
0x0960…0980 20 66 6c 61 67 73 20 61 6e 64 20 66 69 6c 65 20 61 63 63 65 73 73 20 6d 6f 64 65 73 20 6f 66 20   ┆ flags and file access modes of ┆
0x0980…09a0 74 68 65 20 6f 70 65 6e 20 66 69 6c 65 0a 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f 6e 20 77   ┆the open file      description w┆
0x09a0…09c0 69 6c 6c 20 62 65 20 73 65 74 20 61 63 63 6f 72 64 69 6e 67 20 74 6f 20 74 68 65 20 76 61 6c 75   ┆ill be set according to the valu┆
0x09c0…09e0 65 20 6f 66 20 5f 08 66 5f 08 6c 5f 08 61 5f 08 67 5f 08 73 2e 0a 0a 20 20 20 20 20 5f 08 66 5f   ┆e of _ f_ l_ a_ g_ s.       _ f_┆
0x09e0…0a00 08 6c 5f 08 61 5f 08 67 5f 08 73 20 76 61 6c 75 65 73 20 61 72 65 20 63 6f 6e 73 74 72 75 63 74   ┆ l_ a_ g_ s values are construct┆
0x0a00…0a20 65 64 20 62 79 20 62 69 74 77 69 73 65 2d 69 6e 63 6c 75 73 69 76 65 2d 6f 72 69 6e 67 0a 20 20   ┆ed by bitwise-inclusive-oring   ┆
0x0a20…0a40 20 20 20 66 6c 61 67 73 20 66 72 6f 6d 20 74 68 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 6c 69 73 74   ┆   flags from the following list┆
0x0a40…0a60 2c 20 64 65 66 69 6e 65 64 20 69 6e 20 3c 66 08 66 08 66 08 66 63 08 63 08 63 08 63 6e 08 6e 08   ┆, defined in <f f f fc c c cn n ┆
0x0a60…0a80 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 3e   ┆n nt t t tl l l l. . . .h h h h>┆
0x0a80…0aa0 2e 20 41 70 70 6c 69 2d 0a 20 20 20 20 20 63 61 74 69 6f 6e 73 20 6d 75 73 74 20 73 70 65 63 69   ┆. Appli-      cations must speci┆
0x0aa0…0ac0 66 79 20 65 78 61 63 74 6c 79 20 6f 6e 65 20 6f 66 20 74 68 65 20 66 69 72 73 74 20 74 68 72 65   ┆fy exactly one of the first thre┆
0x0ac0…0ae0 65 20 76 61 6c 75 65 73 0a 20 20 20 20 20 28 66 69 6c 65 20 61 63 63 65 73 73 20 6d 6f 64 65 73   ┆e values      (file access modes┆
0x0ae0…0b00 29 20 62 65 6c 6f 77 20 69 6e 20 74 68 65 20 76 61 6c 75 65 20 6f 66 20 5f 08 66 5f 08 6c 5f 08   ┆) below in the value of _ f_ l_ ┆
0x0b00…0b20 61 5f 08 67 5f 08 73 20 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 52 44 4f 4e 4c 59 20 20 20   ┆a_ g_ s .            O_RDONLY   ┆
0x0b20…0b40 20 20 20 20 4f 70 65 6e 20 66 6f 72 20 72 65 61 64 69 6e 67 20 6f 6e 6c 79 2e 0a 0a 20 20 20 20   ┆    Open for reading only.      ┆
0x0b40…0b60 20 20 20 20 20 20 4f 5f 57 52 4f 4e 4c 59 20 20 20 20 20 20 20 4f 70 65 6e 20 66 6f 72 20 77 72   ┆      O_WRONLY       Open for wr┆
0x0b60…0b80 69 74 69 6e 67 20 6f 6e 6c 79 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 52 44 57 52 20 20 20   ┆iting only.            O_RDWR   ┆
0x0b80…0ba0 20 20 20 20 20 20 4f 70 65 6e 20 66 6f 72 20 72 65 61 64 69 6e 67 20 61 6e 64 20 77 72 69 74 69   ┆      Open for reading and writi┆
0x0ba0…0bc0 6e 67 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 4e 44 45 4c 41 59 20 20 20 20 20 20 20 44 6f   ┆ng.            O_NDELAY       Do┆
0x0bc0…0be0 20 6e 6f 74 20 62 6c 6f 63 6b 20 66 6f 72 20 6c 6f 63 6b 20 61 63 71 75 69 73 69 74 69 6f 6e 20   ┆ not block for lock acquisition ┆
0x0be0…0c00 6f 72 20 49 50 43 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆or IPC                          ┆
0x0c00…0c20 70 61 69 72 69 6e 67 20 28 75 73 65 64 20 69 6e 20 63 6f 6e 6a 75 6e 63 74 69 6f 6e 20 77 69 74   ┆pairing (used in conjunction wit┆
0x0c20…0c40 68 20 74 68 65 20 54 58 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆h the TX                        ┆
0x0c40…0c60 20 20 66 69 6c 65 20 6c 65 76 65 6c 20 6c 6f 63 6b 69 6e 67 20 61 6e 64 20 49 50 43 20 66 65 61   ┆  file level locking and IPC fea┆
0x0c60…0c80 74 75 72 65 73 29 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 4e 4f 4e 42 4c 4f 43 4b 20 20 20   ┆tures).            O_NONBLOCK   ┆
0x0c80…0ca0 20 20 57 68 65 6e 20 6f 70 65 6e 69 6e 67 20 61 20 46 49 46 4f 20 77 69 74 68 20 4f 5f 52 44 4f   ┆  When opening a FIFO with O_RDO┆
0x0ca0…0cc0 4e 4c 59 20 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆NLY or                          ┆
0x0cc0…0ce0 4f 5f 57 52 4f 4e 4c 59 20 73 65 74 3a 0a 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20   ┆O_WRONLY set:                   ┆
0x0ce0…0d00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4f 5f 4e 4f 4e 42 4c 4f 43 4b   ┆                   If O_NONBLOCK┆
0x0d00…0d20 20 69 73 20 73 65 74 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ is set:                        ┆
0x0d20…0d40 20 20 20 20 20 20 20 20 20 20 20 20 20 41 6e 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66   ┆             An _ o_ p_ e_ n() f┆
0x0d40…0d60 6f 72 20 72 65 61 64 69 6e 67 20 6f 6e 6c 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆or reading only                 ┆
0x0d60…0d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 77 69 6c 6c 20 72 65 74 75 72 6e 20 77   ┆                   will return w┆
0x0d80…0da0 69 74 68 6f 75 74 20 64 65 6c 61 79 2e 20 41 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ithout delay. An                ┆
0x0da0…0dc0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e   ┆                    _ o_ p_ e_ n┆
0x0dc0…0de0 28 29 20 66 6f 72 20 77 72 69 74 69 6e 67 20 6f 6e 6c 79 20 77 69 6c 6c 0a 20 20 20 20 20 20 20   ┆() for writing only will        ┆
0x0de0…0e00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75   ┆                            retu┆
0x0e00…0e20 72 6e 20 61 6e 20 65 72 72 6f 72 20 69 66 20 6e 6f 20 70 72 6f 63 65 73 73 0a 20 20 20 20 20 20   ┆rn an error if no process       ┆
0x0e20…0e40 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 75 72   ┆                             cur┆
0x0e40…0e60 72 65 6e 74 6c 79 20 68 61 73 20 74 68 65 20 66 69 6c 65 20 6f 70 65 6e 0a 20 20 20 20 20 20 20   ┆rently has the file open        ┆
0x0e60…0e80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6f 72 20   ┆                            for ┆
0x0e80…0ea0 72 65 61 64 69 6e 67 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆reading.                        ┆
0x0ea0…0ec0 20 20 20 20 20 20 20 20 49 66 20 4f 5f 4e 4f 4e 42 4c 4f 43 4b 20 69 73 20 63 6c 65 61 72 3a 0a   ┆        If O_NONBLOCK is clear: ┆
0x0ec0…0ee0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆                                ┆
0x0ee0…0f00 20 20 20 20 41 6e 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66 6f 72 20 72 65 61 64 69 6e   ┆    An _ o_ p_ e_ n() for readin┆
0x0f00…0f20 67 20 6f 6e 6c 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆g only                          ┆
0x0f20…0f40 20 20 20 20 20 20 20 20 20 20 77 69 6c 6c 20 62 6c 6f 63 6b 20 75 6e 74 69 6c 20 61 20 70 72 6f   ┆          will block until a pro┆
0x0f40…0f60 63 65 73 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆cess                            ┆
0x0f60…0f80 20 20 20 20 20 20 20 20 6f 70 65 6e 73 20 74 68 65 20 66 69 6c 65 20 66 6f 72 20 77 72 69 74 69   ┆        opens the file for writi┆
0x0f80…0fa0 6e 67 2e 20 41 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ng. An                          ┆
0x0fa0…0fc0 20 20 20 20 20 20 20 20 20 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66 6f 72 20 77 72 69   ┆          _ o_ p_ e_ n() for wri┆
0x0fc0…0fe0 74 69 6e 67 20 6f 6e 6c 79 20 77 69 6c 6c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ting only will                  ┆
0x0fe0…1000 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 62 6c 6f 63 6b 20 75 6e 74 69 6c 20 61 20   ┆                  block until a ┆
0x1000…1020 70 72 6f 63 65 73 73 20 6f 70 65 6e 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆process opens                   ┆
0x1020…1040 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 66 69 6c 65 20 66 6f 72 20 72 65   ┆                 the file for re┆
0x1040…1060 61 64 69 6e 67 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ading.                          ┆
0x1060…1080 20 57 68 65 6e 20 6f 70 65 6e 69 6e 67 20 61 20 62 6c 6f 63 6b 20 73 70 65 63 69 61 6c 20 6f 72   ┆ When opening a block special or┆
0x1080…10a0 20 63 68 61 72 61 63 2d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ charac-                        ┆
0x10a0…10c0 20 20 74 65 72 20 73 70 65 63 69 61 6c 20 66 69 6c 65 20 74 68 61 74 20 73 75 70 70 6f 72 74 73   ┆  ter special file that supports┆
0x10c0…10e0 20 6e 6f 6e 62 6c 6f 63 6b 2d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ nonblock-                      ┆
0x10e0…1100 20 20 20 20 69 6e 67 20 6f 70 65 72 61 74 69 6f 6e 73 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20   ┆    ing operations:             ┆
0x1100…1120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4f 5f 4e 4f 4e 42 4c 4f 43 4b   ┆                   If O_NONBLOCK┆
0x1120…1140 20 69 73 20 73 65 74 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ is set:                        ┆
0x1140…1160 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 65 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20   ┆             The _ o_ p_ e_ n() ┆
0x1160…1180 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆function will                   ┆
0x1180…11a0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 20 77 69 74 68 6f 75 74 20   ┆                 return without ┆
0x11a0…11c0 62 6c 6f 63 6b 69 6e 67 20 66 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆blocking for                    ┆
0x11c0…11e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 20 64 65 76 69 63 65 20 74 6f 20 62 65   ┆                the device to be┆
0x11e0…1200 20 72 65 61 64 79 20 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ ready or                       ┆
0x1200…1220 20 20 20 20 20 20 20 20 20 20 20 20 20 61 76 61 69 6c 61 62 6c 65 2e 20 53 75 62 73 65 71 75 65   ┆             available. Subseque┆
0x1220…1240 6e 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆nt                              ┆
0x1240…1260 20 20 20 20 20 20 62 65 68 61 76 69 6f 75 72 20 6f 66 20 74 68 65 20 64 65 76 69 63 65 20 69 73   ┆      behaviour of the device is┆
0x1260…1280 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆                                ┆
0x1280…12a0 20 20 20 20 64 65 76 69 63 65 20 73 70 65 63 69 66 69 63 2e 0a 0a 20 20 20 20 20 20 20 20 20 20   ┆    device specific.            ┆
0x12a0…12c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 49 66 20 4f 5f 4e 4f 4e 42 4c 4f 43   ┆                    If O_NONBLOC┆
0x12c0…12e0 4b 20 69 73 20 63 6c 65 61 72 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆K is clear:                     ┆
0x12e0…1300 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 68 65 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e   ┆                The _ o_ p_ e_ n┆
0x1300…1320 28 29 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 20   ┆() function will block          ┆
0x1320…1340 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 75 6e 74 69 6c 20   ┆                          until ┆
0x1340…1360 74 68 65 20 64 65 76 69 63 65 20 69 73 20 72 65 61 64 79 20 6f 72 0a 20 20 20 20 20 20 20 20 20   ┆the device is ready or          ┆
0x1360…1380 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 61 76 61 69 6c 61   ┆                          availa┆
0x1380…13a0 62 6c 65 20 62 65 66 6f 72 65 20 72 65 74 75 72 6e 69 6e 67 2e 0a 0a 20 20 20 20 20 20 20 20 20   ┆ble before returning.           ┆
0x13a0…13c0 20 4f 5f 4e 4f 43 54 54 59 20 20 20 20 20 20 20 49 66 20 73 65 74 20 61 6e 64 20 5f 08 70 5f 08   ┆ O_NOCTTY       If set and _ p_ ┆
0x13c0…13e0 61 5f 08 74 5f 08 68 20 69 64 65 6e 74 69 66 69 65 73 20 61 20 74 65 72 6d 69 6e 61 6c 0a 20 20   ┆a_ t_ h identifies a terminal   ┆
0x13e0…1400 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 64 65 76 69 63 65 2c 20 74   ┆                       device, t┆
0x1400…1420 68 65 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 28 29 20 66 75 6e 63 74 69 6f 6e 20 77 69 6c 6c 20   ┆he _ o_ p_ e_ n() function will ┆
0x1420…1440 6e 6f 74 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 61 75   ┆not                          cau┆
0x1440…1460 73 65 20 74 68 65 20 74 65 72 6d 69 6e 61 6c 20 64 65 76 69 63 65 20 74 6f 20 62 65 63 6f 6d 65   ┆se the terminal device to become┆
0x1460…1480 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 63 6f   ┆ the                          co┆
0x1480…14a0 6e 74 72 6f 6c 6c 69 6e 67 20 74 65 72 6d 69 6e 61 6c 20 66 6f 72 20 74 68 65 20 70 72 6f 63 65   ┆ntrolling terminal for the proce┆
0x14a0…14c0 73 73 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 41 50 50 45 4e 44 20 20 20 20 20 20 20 43 61   ┆ss.            O_APPEND       Ca┆
0x14c0…14e0 75 73 65 73 20 65 61 63 68 20 77 72 69 74 65 20 74 6f 20 62 65 20 70 6c 61 63 65 64 20 61 74 20   ┆uses each write to be placed at ┆
0x14e0…1500 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 65 6e 64   ┆the                          end┆
0x1500…1520 20 6f 66 20 74 68 65 20 66 69 6c 65 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 43 52 45 41 54   ┆ of the file.            O_CREAT┆
0x1520…1540 20 20 20 20 20 20 20 20 43 72 65 61 74 65 20 66 69 6c 65 20 69 66 20 69 74 20 64 6f 65 73 20 6e   ┆        Create file if it does n┆
0x1540…1560 6f 74 20 61 6c 72 65 61 64 79 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ot already                      ┆
0x1560…1580 20 20 20 20 65 78 69 73 74 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 54 52 55 4e 43 20 20 20   ┆    exist.            O_TRUNC   ┆
0x1580…15a0 20 20 20 20 20 54 72 75 6e 63 61 74 65 20 6c 65 6e 67 74 68 20 6f 66 20 65 78 69 73 74 69 6e 67   ┆     Truncate length of existing┆
0x15a0…15c0 20 66 69 6c 65 20 74 6f 20 30 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 55 4e 4c 49 4e 4b 20   ┆ file to 0.            O_UNLINK ┆
0x15c0…15e0 20 20 20 20 20 20 55 6e 6c 69 6e 6b 20 66 69 6c 65 20 69 66 20 69 74 20 65 78 69 73 74 73 2c 20   ┆      Unlink file if it exists, ┆
0x15e0…1600 69 6d 70 6c 69 65 73 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆implies                         ┆
0x1600…1620 20 4f 5f 43 52 45 41 54 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 45 58 43 4c 20 20 20 20 20   ┆ O_CREAT.            O_EXCL     ┆
0x1620…1640 20 20 20 20 45 78 63 6c 75 73 69 76 65 20 63 72 65 61 74 69 6f 6e 20 6c 6f 63 6b 2c 20 72 65 74   ┆    Exclusive creation lock, ret┆
0x1640…1660 75 72 6e 73 20 61 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆urns an                         ┆
0x1660…1680 20 65 72 72 6f 72 20 69 66 20 4f 5f 43 52 45 41 54 20 69 73 20 73 70 65 63 69 66 69 65 64 20 61   ┆ error if O_CREAT is specified a┆
0x1680…16a0 6e 64 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆nd the                          ┆
0x16a0…16c0 66 69 6c 65 20 65 78 69 73 74 73 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 53 59 4e 43 20 20   ┆file exists.            O_SYNC  ┆
0x16c0…16e0 20 20 20 20 20 20 20 43 61 75 73 65 20 61 6c 6c 20 64 61 74 61 20 77 72 69 74 74 65 6e 20 74 6f   ┆       Cause all data written to┆
0x16e0…1700 20 74 68 65 20 66 69 6c 65 20 74 6f 20 62 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ the file to be                 ┆
0x1700…1720 20 20 20 20 20 20 20 20 20 73 79 6e 63 68 72 6f 6e 6f 75 73 6c 79 20 77 72 69 74 74 65 6e 20 74   ┆         synchronously written t┆
0x1720…1740 6f 20 64 69 73 6b 20 28 64 69 73 6b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆o disk (disk                    ┆
0x1740…1760 20 20 20 20 20 20 66 69 6c 65 73 20 6f 6e 6c 79 29 2e 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 20 20   ┆      files only).              ┆
0x1760…1780 20 20 20 4f 5f 45 58 4c 4f 43 4b 20 20 20 20 20 20 20 41 70 70 6c 79 20 65 78 63 6c 75 73 69 76   ┆   O_EXLOCK       Apply exclusiv┆
0x1780…17a0 65 20 6c 6f 63 6b 20 28 4c 4f 43 4b 5f 45 58 29 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 53   ┆e lock (LOCK_EX).            O_S┆
0x17a0…17c0 48 4c 4f 43 4b 20 20 20 20 20 20 20 41 70 70 6c 79 20 73 68 61 72 65 64 20 6c 6f 63 6b 20 28 4c   ┆HLOCK       Apply shared lock (L┆
0x17c0…17e0 4f 43 4b 5f 53 48 29 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 43 4f 4e 54 52 4f 4c 20 20 20   ┆OCK_SH).            O_CONTROL   ┆
0x17e0…1800 20 20 20 43 6f 6e 74 72 6f 6c 6c 65 64 20 61 63 63 65 73 73 20 66 6c 61 67 2c 20 72 65 71 75 69   ┆   Controlled access flag, requi┆
0x1800…1820 72 65 64 20 66 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆red for                         ┆
0x1820…1840 20 74 72 61 6e 73 61 63 74 69 6f 6e 20 72 6f 6c 6c 2d 62 61 63 6b 20 6f 6e 20 53 49 47 41 42 4f   ┆ transaction roll-back on SIGABO┆
0x1840…1860 52 54 2e 0a 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 44 45 54 41 43 48 20 20 20 20 20 20 20 4f 70   ┆RT.            O_DETACH       Op┆
0x1860…1880 65 6e 20 54 58 49 50 43 20 63 68 61 6e 6e 65 6c 20 61 6e 64 20 69 73 73 75 65 20 61 20 64 65 74   ┆en TXIPC channel and issue a det┆
0x1880…18a0 61 63 68 20 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆ach on                          ┆
0x18a0…18c0 74 68 65 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 2e 0a 0a 20 20 20 20 20 20 20 20 20 20   ┆the file descriptor.            ┆
0x18c0…18e0 4f 5f 4d 45 53 53 41 47 45 20 20 20 20 20 20 4f 70 65 6e 20 54 58 49 50 43 20 63 68 61 6e 6e 65   ┆O_MESSAGE      Open TXIPC channe┆
0x18e0…1900 6c 20 66 6f 72 20 6d 65 73 73 61 67 65 20 6d 6f 64 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 20   ┆l for message mode              ┆
0x1900…1920 20 20 20 20 20 20 20 20 20 20 20 20 6f 70 65 72 61 74 69 6f 6e 20 28 6e 6f 74 20 73 74 72 65 61   ┆            operation (not strea┆
[…truncated at 200 lines…]