|
|
DataMuseum.dkPresents historical artifacts from the history of: RC9000 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about RC9000 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - downloadIndex: o
Length: 17109 (0x42d5)
Names: »open.2«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/man/cat2/open.2«
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 73 08 73 08 73 08 73 79 08 79 08 79 08 79 73 08 73 08 ┆ e e e < < < <s s s sy y y ys s ┆ 0x0260…0280 73 08 73 2f 08 2f 08 2f 08 2f 66 08 66 08 66 08 66 69 08 69 08 69 08 69 6c 08 6c 08 6c 08 6c 65 ┆s s/ / / /f f f fi i i il l l le┆ 0x0280…02a0 08 65 08 65 08 65 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e 08 3e 08 3e 08 3e 0a 0a 20 20 20 ┆ e e e. . . .h h h h> > > > ┆ 0x02a0…02c0 20 20 66 08 66 08 66 08 66 64 08 64 08 64 08 64 20 3d 08 3d 08 3d 08 3d 20 6f 08 6f 08 6f 08 6f ┆ f f f fd d d d = = = = o o o o┆ 0x02c0…02e0 70 08 70 08 70 08 70 65 08 65 08 65 08 65 6e 08 6e 08 6e 08 6e 28 08 28 08 28 08 28 70 08 70 08 ┆p p p pe e e en n n n( ( ( (p p ┆ 0x02e0…0300 70 08 70 61 08 61 08 61 08 61 74 08 74 08 74 08 74 68 08 68 08 68 08 68 2c 08 2c 08 2c 08 2c 20 ┆p pa a a at t t th h h h, , , , ┆ 0x0300…0320 66 08 66 08 66 08 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 ┆f f f fl l l la a a ag g g gs s ┆ 0x0320…0340 73 08 73 2c 08 2c 08 2c 08 2c 20 6d 08 6d 08 6d 08 6d 6f 08 6f 08 6f 08 6f 64 08 64 08 64 08 64 ┆s s, , , , m m m mo o o od d d d┆ 0x0340…0360 65 08 65 08 65 08 65 29 08 29 08 29 08 29 0a 20 20 20 20 20 63 08 63 08 63 08 63 68 08 68 08 68 ┆e e e e) ) ) ) c c c ch h h┆ 0x0360…0380 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 08 70 61 ┆ ha a a ar r r r * * * *p p p pa┆ 0x0380…03a0 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 20 20 20 ┆ a a at t t th h h h; ; ; ; ┆ 0x03a0…03c0 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 66 6c 08 ┆ i i i in n n nt t t t f f f fl ┆ 0x03c0…03e0 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 2c 08 2c 08 2c 08 ┆l l la a a ag g g gs s s s, , , ┆ 0x03e0…0400 2c 20 6d 08 6d 08 6d 08 6d 6f 08 6f 08 6f 08 6f 64 08 64 08 64 08 64 65 08 65 08 65 08 65 3b 08 ┆, m m m mo o o od d d de e e e; ┆ 0x0400…0420 3b 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 ┆; ; ; D D D DE E E ES S S SC C ┆ 0x0420…0440 43 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 ┆C CR R R RI I I IP P P PT T T TI┆ 0x0440…0460 08 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 69 73 20 63 ┆ I I IO O O ON N N N This c┆ 0x0460…0480 61 6c 6c 20 6f 70 65 6e 73 20 74 68 65 20 6e 61 6d 65 64 20 5f 08 66 5f 08 69 5f 08 6c 5f 08 65 ┆all opens the named _ f_ i_ l_ e┆ 0x0480…04a0 20 5f 08 6f 5f 08 62 5f 08 6a 5f 08 65 5f 08 63 5f 08 74 20 66 6f 72 20 72 65 61 64 69 6e 67 20 ┆ _ o_ b_ j_ e_ c_ t for reading ┆ 0x04a0…04c0 61 6e 64 2f 6f 72 0a 20 20 20 20 20 77 72 69 74 69 6e 67 2e 20 20 41 20 66 69 6c 65 20 6f 62 6a ┆and/or writing. A file obj┆ 0x04c0…04e0 65 63 74 20 63 61 6e 20 62 65 20 61 20 64 69 73 6b 20 66 69 6c 65 2c 20 61 20 54 58 2d 20 6f 72 ┆ect can be a disk file, a TX- or┆ 0x04e0…0500 20 4d 58 2d 20 49 50 43 0a 20 20 20 20 20 63 68 61 6e 6e 65 6c 2c 20 61 20 73 6f 63 6b 65 74 2c ┆ MX- IPC channel, a socket,┆ 0x0500…0520 20 61 20 74 74 79 2c 20 61 20 6e 6f 6c 6f 67 69 6e 20 6c 69 6e 65 2c 20 61 20 70 72 69 6e 74 65 ┆ a tty, a nologin line, a printe┆ 0x0520…0540 72 2c 20 6f 72 20 61 0a 20 20 20 20 20 72 61 77 20 64 65 76 69 63 65 20 28 66 6f 72 20 65 78 61 ┆r, or a raw device (for exa┆ 0x0540…0560 6d 70 6c 65 2c 20 61 20 6d 61 67 6e 65 74 69 63 20 74 61 70 65 20 6f 72 20 63 6f 6e 73 6f 6c 65 ┆mple, a magnetic tape or console┆ 0x0560…0580 29 2e 20 20 54 68 65 0a 20 20 20 20 20 63 61 6c 6c 20 72 65 74 75 72 6e 73 20 61 20 66 69 6c 65 ┆). The call returns a file┆ 0x0580…05a0 20 64 65 73 63 72 69 70 74 6f 72 20 28 61 20 70 6f 73 69 74 69 76 65 20 69 6e 74 65 67 65 72 20 ┆ descriptor (a positive integer ┆ 0x05a0…05c0 2d 20 61 20 6e 65 67 61 2d 0a 20 20 20 20 20 74 69 76 65 20 72 65 74 75 72 6e 20 76 61 6c 75 65 ┆- a nega- tive return value┆ 0x05c0…05e0 20 69 6e 64 69 63 61 74 65 73 20 61 6e 20 65 72 72 6f 72 29 2e 20 20 41 66 74 65 72 20 61 20 73 ┆ indicates an error). After a s┆ 0x05e0…0600 75 63 63 65 73 73 66 75 6c 0a 20 20 20 20 20 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 63 61 6c 6c ┆uccessful _ o_ p_ e_ n call┆ 0x0600…0620 2c 20 61 6c 6c 20 73 75 62 73 65 71 75 65 6e 74 20 72 65 66 65 72 65 6e 63 65 73 20 74 6f 20 74 ┆, all subsequent references to t┆ 0x0620…0640 68 65 20 66 69 6c 65 20 6f 62 6a 65 63 74 0a 20 20 20 20 20 73 68 6f 75 6c 64 20 62 65 20 6d 61 ┆he file object should be ma┆ 0x0640…0660 64 65 20 75 73 69 6e 67 20 74 68 65 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 2e 20 20 54 ┆de using the file descriptor. T┆ 0x0660…0680 68 65 20 63 75 72 72 65 6e 74 2d 0a 20 20 20 20 20 70 6f 73 69 74 69 6f 6e 20 70 6f 69 6e 74 65 ┆he current- position pointe┆ 0x0680…06a0 72 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 68 65 ┆r is set to the beginning of the┆ 0x06a0…06c0 20 66 69 6c 65 2e 0a 0a 20 20 20 20 20 54 68 65 20 73 79 73 74 65 6d 20 6c 69 6d 69 74 20 66 6f ┆ file. The system limit fo┆ 0x06c0…06e0 72 20 6f 70 65 6e 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 73 20 69 73 20 32 35 36 20 70 ┆r open file descriptors is 256 p┆ 0x06e0…0700 65 72 20 70 72 6f 2d 0a 20 20 20 20 20 63 65 73 73 2c 20 61 73 20 64 65 66 69 6e 65 64 20 62 79 ┆er pro- cess, as defined by┆ 0x0700…0720 20 4e 4f 46 49 4c 45 20 69 6e 20 3c 73 79 73 2f 70 61 72 61 6d 2e 68 3e 2e 0a 0a 20 20 20 20 20 ┆ NOFILE in <sys/param.h>. ┆ 0x0720…0740 4e 6f 74 65 20 74 68 61 74 20 74 68 65 20 66 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 73 20 6e ┆Note that the file descriptors n┆ 0x0740…0760 6f 72 6d 61 6c 6c 79 20 72 65 6d 61 69 6e 20 6f 70 65 6e 20 61 63 72 6f 73 73 0a 20 20 20 20 20 ┆ormally remain open across ┆ 0x0760…0780 5f 08 66 5f 08 6f 5f 08 72 5f 08 6b 2c 20 5f 08 72 5f 08 75 5f 08 6e 2c 20 61 6e 64 20 5f 08 65 ┆_ f_ o_ r_ k, _ r_ u_ n, and _ e┆ 0x0780…07a0 5f 08 78 5f 08 65 5f 08 63 5f 08 76 5f 08 65 20 63 61 6c 6c 73 2e 0a 0a 20 20 20 20 20 54 68 69 ┆_ x_ e_ c_ v_ e calls. Thi┆ 0x07a0…07c0 73 20 63 61 6c 6c 20 69 73 20 61 75 74 6f 6d 61 74 69 63 61 6c 6c 79 20 72 65 73 74 61 72 74 65 ┆s call is automatically restarte┆ 0x07c0…07e0 64 20 69 66 20 69 6e 74 65 72 72 75 70 74 65 64 20 66 6f 72 20 73 69 67 2d 0a 20 20 20 20 20 6e ┆d if interrupted for sig- n┆ 0x07e0…0800 61 6c 20 64 65 6c 69 76 65 72 79 2c 20 75 6e 6c 65 73 73 20 74 68 65 20 70 72 6f 63 65 73 73 20 ┆al delivery, unless the process ┆ 0x0800…0820 65 69 74 68 65 72 20 68 61 73 20 61 20 73 69 67 6e 61 6c 20 68 61 6e 64 6c 65 72 0a 20 20 20 20 ┆either has a signal handler ┆ 0x0820…0840 20 74 68 61 74 20 64 6f 65 73 20 6e 6f 74 20 72 65 74 75 72 6e 20 6e 6f 72 6d 61 6c 6c 79 2c 20 ┆ that does not return normally, ┆ 0x0840…0860 6f 72 20 68 61 73 20 75 73 65 64 20 74 68 65 20 5f 08 73 5f 08 69 5f 08 67 5f 08 73 5f 08 65 5f ┆or has used the _ s_ i_ g_ s_ e_┆ 0x0860…0880 08 74 5f 08 6d 5f 08 6f 5f 08 64 5f 08 65 20 28 29 0a 20 20 20 20 20 63 61 6c 6c 20 74 6f 20 62 ┆ t_ m_ o_ d_ e () call to b┆ 0x0880…08a0 6c 6f 63 6b 20 74 68 65 20 72 65 73 74 61 72 74 20 61 74 74 65 6d 70 74 2e 0a 0a 20 20 20 20 20 ┆lock the restart attempt. ┆ 0x08a0…08c0 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 08 68 20 53 70 65 ┆p p p pa a a at t t th h h h Spe┆ 0x08c0…08e0 63 69 66 69 65 73 20 74 68 65 20 70 61 74 68 6e 61 6d 65 20 6f 66 20 74 68 65 20 66 69 6c 65 20 ┆cifies the pathname of the file ┆ 0x08e0…0900 6f 62 6a 65 63 74 20 74 6f 20 62 65 20 6f 70 65 6e 65 64 2e 0a 20 20 20 20 20 20 20 20 20 20 49 ┆object to be opened. I┆ 0x0900…0920 74 20 69 73 20 61 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 ┆t is a standard C string (null-t┆ 0x0920…0940 65 72 6d 69 6e 61 74 65 64 20 41 53 43 49 49 20 63 68 61 72 2d 0a 20 20 20 20 20 20 20 20 20 20 ┆erminated ASCII char- ┆ 0x0940…0960 61 63 74 65 72 73 29 2e 20 20 53 69 6e 63 65 20 54 58 20 73 75 70 70 6f 72 74 73 20 61 20 64 69 ┆acters). Since TX supports a di┆ 0x0960…0980 73 74 72 69 62 75 74 65 64 20 66 69 6c 65 20 73 79 73 74 65 6d 2c 0a 20 20 20 20 20 20 20 20 20 ┆stributed file system, ┆ 0x0980…09a0 20 74 68 65 20 70 61 74 68 6e 61 6d 65 20 63 61 6e 20 69 6e 64 69 63 61 74 65 20 61 20 66 69 6c ┆ the pathname can indicate a fil┆ 0x09a0…09c0 65 20 6f 6e 20 61 6e 6f 74 68 65 72 20 50 55 2e 0a 0a 20 20 20 20 20 66 08 66 08 66 08 66 6c 08 ┆e on another PU. f f f fl ┆ 0x09c0…09e0 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 0a 20 20 20 20 20 ┆l l la a a ag g g gs s s s ┆ 0x09e0…0a00 20 20 20 20 20 53 70 65 63 69 66 69 65 73 20 66 69 6c 65 20 63 68 61 72 61 63 74 65 72 69 73 74 ┆ Specifies file characterist┆ 0x0a00…0a20 69 63 73 20 61 6e 64 20 6f 70 65 6e 20 6f 70 74 69 6f 6e 73 2e 20 20 54 68 65 0a 20 20 20 20 20 ┆ics and open options. The ┆ 0x0a20…0a40 20 20 20 20 20 66 6c 61 67 73 20 61 72 65 20 66 6f 72 6d 65 64 20 62 79 20 5f 08 6f 5f 08 72 69 ┆ flags are formed by _ o_ ri┆ 0x0a40…0a60 6e 67 20 28 20 7c 20 29 20 74 68 65 20 76 61 6c 75 65 73 20 6f 66 20 74 68 65 0a 20 20 20 20 20 ┆ng ( | ) the values of the ┆ 0x0a60…0a80 20 20 20 20 20 73 65 6c 65 63 74 65 64 20 75 73 65 72 2d 64 65 66 69 6e 69 74 69 6f 6e 73 20 66 ┆ selected user-definitions f┆ 0x0a80…0aa0 72 6f 6d 20 3c 73 79 73 2f 66 69 6c 65 2e 68 3e 2e 20 20 54 68 65 0a 20 20 20 20 20 20 20 20 20 ┆rom <sys/file.h>. The ┆ 0x0aa0…0ac0 20 64 65 66 69 6e 65 20 6e 61 6d 65 73 20 61 6e 64 20 6d 65 61 6e 69 6e 67 73 20 61 72 65 20 6c ┆ define names and meanings are l┆ 0x0ac0…0ae0 69 73 74 65 64 20 62 65 6c 6f 77 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 52 44 4f 4e 4c ┆isted below: O_RDONL┆ 0x0ae0…0b00 59 20 20 20 20 20 20 6f 70 65 6e 20 66 6f 72 20 72 65 61 64 69 6e 67 20 6f 6e 6c 79 0a 20 20 20 ┆Y open for reading only ┆ 0x0b00…0b20 20 20 20 20 20 20 20 20 4f 5f 57 52 4f 4e 4c 59 20 20 20 20 20 20 6f 70 65 6e 20 66 6f 72 20 77 ┆ O_WRONLY open for w┆ 0x0b20…0b40 72 69 74 69 6e 67 20 6f 6e 6c 79 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 52 44 57 52 20 20 20 ┆riting only O_RDWR ┆ 0x0b40…0b60 20 20 20 20 20 6f 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 6e ┆ open for reading and writin┆ 0x0b60…0b80 67 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 4e 44 45 4c 41 59 20 20 20 20 20 20 64 6f 20 6e 6f ┆g O_NDELAY do no┆ 0x0b80…0ba0 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 6f 72 20 ┆t block for lock acquisition or ┆ 0x0ba0…0bc0 49 50 43 0a 20 20 20 20 20 20 20 20 20 20 70 61 69 72 69 6e 67 20 28 53 65 65 20 45 72 72 6f 72 ┆IPC pairing (See Error┆ 0x0bc0…0be0 3a 20 45 57 4f 55 4c 44 42 4c 4f 43 4b 29 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 41 50 50 45 ┆: EWOULDBLOCK) O_APPE┆ 0x0be0…0c00 4e 44 20 20 20 20 20 20 63 61 75 73 65 73 20 65 61 63 68 20 77 72 69 74 65 20 74 6f 20 62 65 20 ┆ND causes each write to be ┆ 0x0c00…0c20 70 6c 61 63 65 64 20 61 74 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 65 6e 64 20 6f 66 20 74 ┆placed at the end of t┆ 0x0c20…0c40 68 65 20 66 69 6c 65 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 43 52 45 41 54 20 20 20 20 20 20 ┆he file O_CREAT ┆ 0x0c40…0c60 20 63 72 65 61 74 65 20 66 69 6c 65 20 69 66 20 69 74 20 64 6f 65 73 20 6e 6f 74 20 61 6c 72 65 ┆ create file if it does not alre┆ 0x0c60…0c80 61 64 79 20 65 78 69 73 74 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 54 52 55 4e 43 20 20 20 20 ┆ady exist O_TRUNC ┆ 0x0c80…0ca0 20 20 20 74 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 20 66 ┆ truncate length of existing f┆ 0x0ca0…0cc0 69 6c 65 20 74 6f 20 30 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 55 4e 4c 49 4e 4b 20 20 20 20 ┆ile to 0 O_UNLINK ┆ 0x0cc0…0ce0 20 20 75 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 69 6d 70 6c ┆ unlink file if it exists, impl┆ 0x0ce0…0d00 69 65 73 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 43 52 45 41 54 0a 20 20 20 20 20 20 20 20 20 20 ┆ies O_CREAT ┆ 0x0d00…0d20 20 4f 5f 45 58 43 4c 20 20 20 20 20 20 20 20 65 78 63 6c 75 73 69 76 65 20 63 72 65 61 74 69 6f ┆ O_EXCL exclusive creatio┆ 0x0d20…0d40 6e 20 6c 6f 63 6b 2c 20 72 65 74 75 72 6e 73 20 61 6e 0a 20 20 20 20 20 20 20 20 20 20 65 72 72 ┆n lock, returns an err┆ 0x0d40…0d60 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 6e 64 20 20 ┆or if O_CREAT is specified and ┆ 0x0d60…0d80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 ┆ the file┆ 0x0d80…0da0 20 65 78 69 73 74 73 0a 0a 0a 0a 0a 0a 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 53 59 4e 43 20 ┆ exists O_SYNC ┆ 0x0da0…0dc0 20 20 20 20 20 20 20 20 63 61 75 73 65 20 61 6c 6c 20 64 61 74 61 20 77 72 69 74 74 65 6e 20 74 ┆ cause all data written t┆ 0x0dc0…0de0 6f 20 74 68 65 20 66 69 6c 65 20 74 6f 0a 20 20 20 20 20 20 20 20 20 20 62 65 20 73 79 6e 63 68 ┆o the file to be synch┆ 0x0de0…0e00 72 6f 6e 6f 75 73 6c 79 20 77 72 69 74 74 65 6e 20 74 6f 20 64 69 73 6b 20 20 20 20 20 20 20 20 ┆ronously written to disk ┆ 0x0e00…0e20 20 20 20 20 20 20 20 20 28 64 69 73 6b 0a 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 73 20 6f 6e ┆ (disk files on┆ 0x0e20…0e40 6c 79 29 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 45 58 4c 4f 43 4b 20 20 20 20 20 20 61 70 70 ┆ly) O_EXLOCK app┆ 0x0e40…0e60 6c 79 20 65 78 63 6c 75 73 69 76 65 20 6c 6f 63 6b 20 28 4c 4f 43 4b 5f 45 58 29 0a 20 20 20 20 ┆ly exclusive lock (LOCK_EX) ┆ 0x0e60…0e80 20 20 20 20 20 20 20 4f 5f 53 48 4c 4f 43 4b 20 20 20 20 20 20 61 70 70 6c 79 20 73 68 61 72 65 ┆ O_SHLOCK apply share┆ 0x0e80…0ea0 64 20 6c 6f 63 6b 20 28 4c 4f 43 4b 5f 53 48 29 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 43 4f ┆d lock (LOCK_SH) O_CO┆ 0x0ea0…0ec0 4e 54 52 4f 4c 20 20 20 20 20 20 20 20 20 20 63 6f 6e 74 72 6f 6c 6c 65 64 20 61 63 63 65 73 73 ┆NTROL controlled access┆ 0x0ec0…0ee0 20 66 6c 61 67 2c 20 72 65 71 75 69 72 65 64 0a 20 20 20 20 20 20 20 20 20 20 66 6f 72 20 74 72 ┆ flag, required for tr┆ 0x0ee0…0f00 61 6e 73 61 63 74 69 6f 6e 20 72 6f 6c 6c 2d 62 61 63 6b 20 6f 6e 20 20 20 20 20 20 20 20 20 20 ┆ansaction roll-back on ┆ 0x0f00…0f20 20 20 20 20 20 20 53 49 47 41 42 4f 52 54 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 44 45 54 41 ┆ SIGABORT O_DETA┆ 0x0f20…0f40 43 48 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 68 61 6e 6e 65 6c 20 61 6e 64 20 69 ┆CH open TXIPC channel and i┆ 0x0f40…0f60 73 73 75 65 20 61 20 64 65 74 61 63 68 20 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 74 68 65 20 66 ┆ssue a detach on the f┆ 0x0f60…0f80 69 6c 65 20 64 65 73 63 72 69 70 74 6f 72 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 4d 45 53 53 ┆ile descriptor O_MESS┆ 0x0f80…0fa0 41 47 45 20 20 20 20 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 68 61 6e 6e 65 6c 20 ┆AGE open TXIPC channel ┆ 0x0fa0…0fc0 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 6f 70 65 72 61 ┆for message mode opera┆ 0x0fc0…0fe0 74 69 6f 6e 20 28 6e 6f 74 20 73 74 72 65 61 6d 29 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 46 ┆tion (not stream) O_F┆ 0x0fe0…1000 4f 52 43 45 4f 50 45 4e 20 20 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 68 61 6e 6e ┆ORCEOPEN open TXIPC chann┆ 0x1000…1020 65 6c 20 65 76 65 6e 20 69 66 20 6e 6f 20 6f 74 68 65 72 0a 20 20 20 20 20 20 20 20 20 20 70 72 ┆el even if no other pr┆ 0x1020…1040 6f 63 65 73 73 20 69 73 20 61 76 61 69 6c 61 62 6c 65 20 20 20 20 20 20 20 20 20 20 20 20 20 20 ┆ocess is available ┆ 0x1040…1060 20 20 28 63 61 6c 6c 65 72 20 77 69 6c 6c 20 62 6c 6f 63 6b 0a 20 20 20 20 20 20 20 20 20 20 6f ┆ (caller will block o┆ 0x1060…1080 6e 20 66 69 72 73 74 20 49 2f 4f 20 6f 6e 20 64 65 73 63 72 69 70 74 6f 72 29 0a 20 20 20 20 20 ┆n first I/O on descriptor) ┆ 0x1080…10a0 20 20 20 20 20 20 4f 5f 50 45 45 52 20 20 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 ┆ O_PEER open TXIPC c┆ 0x10a0…10c0 68 61 6e 6e 65 6c 20 61 73 20 61 20 70 65 65 72 20 70 72 6f 63 65 73 73 0a 20 20 20 20 20 20 20 ┆hannel as a peer process ┆ 0x10c0…10e0 20 20 20 20 4f 5f 43 4c 49 45 4e 54 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 68 61 ┆ O_CLIENT open TXIPC cha┆ 0x10e0…1100 6e 6e 65 6c 20 61 73 20 61 20 63 6c 69 65 6e 74 20 70 72 6f 63 65 73 73 0a 20 20 20 20 20 20 20 ┆nnel as a client process ┆ 0x1100…1120 20 20 20 20 4f 5f 53 45 52 56 45 52 20 20 20 20 20 20 6f 70 65 6e 20 54 58 49 50 43 20 63 68 61 ┆ O_SERVER open TXIPC cha┆ 0x1120…1140 6e 6e 65 6c 20 61 73 20 61 20 73 65 72 76 65 72 20 70 72 6f 63 65 73 73 0a 20 20 20 20 20 20 20 ┆nnel as a server process ┆ 0x1140…1160 20 20 20 20 4f 5f 52 44 4c 4f 47 20 20 20 20 20 20 20 69 6e 74 65 72 6e 61 6c 20 75 73 65 20 6f ┆ O_RDLOG internal use o┆ 0x1160…1180 6e 6c 79 0a 20 20 20 20 20 20 20 20 20 20 20 4f 5f 4d 58 49 50 43 20 20 20 20 20 20 20 6f 70 65 ┆nly O_MXIPC ope┆ 0x1180…11a0 6e 20 4d 58 49 50 43 20 63 68 61 6e 6e 65 6c 0a 0a 20 20 20 20 20 6d 08 6d 08 6d 08 6d 6f 08 6f ┆n MXIPC channel m m m mo o┆ 0x11a0…11c0 08 6f 08 6f 64 08 64 08 64 08 64 65 08 65 08 65 08 65 20 53 70 65 63 69 66 69 65 73 20 74 68 65 ┆ o od d d de e e e Specifies the┆ 0x11c0…11e0 20 66 69 6c 65 20 63 72 65 61 74 69 6f 6e 20 6d 6f 64 65 2e 20 20 54 68 69 73 20 70 61 72 61 6d ┆ file creation mode. This param┆ 0x11e0…1200 65 74 65 72 20 69 73 0a 20 20 20 20 20 20 20 20 20 20 72 65 71 75 69 72 65 64 20 69 66 20 4f 5f ┆eter is required if O_┆ 0x1200…1220 43 52 45 41 54 20 6f 72 20 4f 5f 55 4e 4c 49 4e 4b 20 28 77 68 69 63 68 20 69 6d 70 6c 69 65 73 ┆CREAT or O_UNLINK (which implies┆ 0x1220…1240 0a 20 20 20 20 20 20 20 20 20 20 4f 5f 43 52 45 41 54 45 29 20 69 73 20 73 70 65 63 69 66 69 65 ┆ O_CREATE) is specifie┆ 0x1240…1260 64 3b 20 6f 74 68 65 72 77 69 73 65 2c 20 69 74 20 69 73 20 69 67 6e 6f 72 65 64 2e 20 20 5f 08 ┆d; otherwise, it is ignored. _ ┆ 0x1260…1280 6d 5f 08 6f 5f 08 64 5f 08 65 0a 20 20 20 20 20 20 20 20 20 20 69 73 20 66 6f 72 6d 65 64 20 62 ┆m_ o_ d_ e is formed b┆ 0x1280…12a0 79 20 5f 08 6f 5f 08 72 69 6e 67 20 28 20 7c 20 29 20 74 68 65 20 6d 6f 64 65 20 62 69 74 73 20 ┆y _ o_ ring ( | ) the mode bits ┆ 0x12a0…12c0 64 65 66 69 6e 65 64 20 69 6e 0a 20 20 20 20 20 20 20 20 20 20 3c 73 79 73 2f 73 74 61 74 2e 68 ┆defined in <sys/stat.h┆ 0x12c0…12e0 3e 2e 0a 20 20 20 20 20 20 20 20 20 20 54 68 65 20 68 69 67 68 2d 6f 72 64 65 72 20 31 36 20 62 ┆>. The high-order 16 b┆ 0x12e0…1300 69 74 73 20 63 6f 6e 74 61 69 6e 20 74 68 65 20 53 5f 49 53 45 43 55 52 45 20 62 69 74 20 66 72 ┆its contain the S_ISECURE bit fr┆ 0x1300…1320 6f 6d 0a 20 20 20 20 20 20 20 20 20 20 74 68 65 20 65 78 74 65 6e 64 65 64 2d 6d 6f 64 65 20 62 ┆om the extended-mode b┆ 0x1320…1340 69 74 73 20 28 73 65 65 20 73 74 5f 66 6c 61 67 73 20 69 6e 20 74 68 65 20 76 61 6c 75 65 0a 20 ┆its (see st_flags in the value ┆ 0x1340…1360 20 20 20 20 20 20 20 20 20 72 65 74 75 72 6e 65 64 20 62 79 20 5f 08 73 5f 08 74 5f 08 61 5f 08 ┆ returned by _ s_ t_ a_ ┆ 0x1360…1380 74 29 2e 20 20 49 74 20 6d 61 79 20 62 65 20 73 65 74 20 62 79 20 73 68 69 66 74 69 6e 67 20 74 ┆t). It may be set by shifting t┆ 0x1380…13a0 68 69 73 0a 20 20 20 20 20 20 20 20 20 20 76 61 6c 75 65 20 6c 65 66 74 20 31 36 20 62 69 74 73 ┆his value left 16 bits┆ 0x13a0…13c0 20 61 6e 64 20 5f 08 6f 5f 08 72 69 6e 67 20 69 74 20 77 69 74 68 20 74 68 65 20 6f 74 68 65 72 ┆ and _ o_ ring it with the other┆ 0x13c0…13e0 20 6d 6f 64 65 0a 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 73 2c 20 61 73 20 73 68 6f 77 6e 3a ┆ mode flags, as shown:┆ 0x13e0…1400 0a 0a 20 20 20 20 20 20 20 20 20 20 6d 6f 64 65 20 3d 20 6d 6f 64 65 20 7c 20 28 53 5f 49 53 45 ┆ mode = mode | (S_ISE┆ 0x1400…1420 43 55 52 45 20 3c 3c 20 31 36 29 0a 0a 20 20 20 20 20 20 20 20 20 20 20 53 5f 49 53 45 43 55 52 ┆CURE << 16) S_ISECUR┆ 0x1420…1440 45 20 20 20 20 20 20 20 20 20 20 66 69 6c 65 20 6d 75 73 74 20 62 65 20 75 73 65 64 20 69 6e 20 ┆E file must be used in ┆ 0x1440…1460 63 6f 6e 74 72 6f 6c 6c 65 64 0a 20 20 20 20 20 20 20 20 20 20 28 74 72 61 6e 73 61 63 74 69 6f ┆controlled (transactio┆ 0x1460…1480 6e 29 20 6d 6f 64 65 20 6f 72 20 77 69 74 68 20 52 44 4f 4e 4c 59 0a 20 20 20 20 20 54 68 65 20 ┆n) mode or with RDONLY The ┆ 0x1480…14a0 6c 6f 77 2d 6f 72 64 65 72 20 31 36 20 62 69 74 73 20 6f 66 20 74 68 65 20 5f 08 6d 5f 08 6f 5f ┆low-order 16 bits of the _ m_ o_┆ 0x14a0…14c0 08 64 5f 08 65 20 70 61 72 61 6d 65 74 65 72 20 63 61 6e 20 69 6e 63 6c 75 64 65 20 70 65 72 2d ┆ d_ e parameter can include per-┆ 0x14c0…14e0 0a 20 20 20 20 20 6d 69 73 73 69 6f 6e 73 20 28 75 73 65 72 2c 20 67 72 6f 75 70 2c 20 61 6e 64 ┆ missions (user, group, and┆ 0x14e0…1500 20 70 75 62 6c 69 63 29 2c 20 61 6e 64 20 73 65 74 75 69 64 20 49 44 20 28 75 73 65 72 20 61 6e ┆ public), and setuid ID (user an┆ 0x1500…1520 64 0a 20 20 20 20 20 67 72 6f 75 70 29 2e 20 54 68 65 20 53 5f 49 53 56 54 58 20 62 69 74 2c 20 ┆d group). The S_ISVTX bit, ┆ 0x1520…1540 74 68 65 20 60 60 73 74 69 63 6b 79 20 62 69 74 27 27 20 28 30 78 32 30 30 29 20 6d 61 79 20 6e ┆the ``sticky bit'' (0x200) may n┆ 0x1540…1560 6f 74 0a 20 20 20 20 20 62 65 20 73 65 74 2e 20 54 68 65 20 62 69 74 73 20 61 72 65 20 6c 69 73 ┆ot be set. The bits are lis┆ 0x1560…1580 74 65 64 20 62 65 6c 6f 77 3a 0a 20 20 20 20 20 20 20 20 20 20 20 53 5f 49 53 55 49 44 20 20 20 ┆ted below: S_ISUID ┆ 0x1580…15a0 20 20 20 20 73 65 74 20 75 73 65 72 20 49 44 20 6f 6e 20 65 78 65 63 75 74 69 6f 6e 0a 20 20 20 ┆ set user ID on execution ┆ 0x15a0…15c0 20 20 20 20 20 20 20 20 53 5f 49 53 47 49 44 20 20 20 20 20 20 20 73 65 74 20 67 72 6f 75 70 20 ┆ S_ISGID set group ┆ 0x15c0…15e0 49 44 20 6f 6e 20 65 78 65 63 75 74 69 6f 6e 0a 20 20 20 20 20 20 20 20 20 20 20 53 5f 49 53 56 ┆ID on execution S_ISV┆ 0x15e0…1600 54 58 20 20 20 20 20 20 20 63 61 6e 6e 6f 74 20 62 65 20 73 65 74 20 69 6e 20 5f 08 6f 5f 08 70 ┆TX cannot be set in _ o_ p┆ 0x1600…1620 5f 08 65 5f 08 6e 0a 20 20 20 20 20 20 20 20 20 20 20 53 5f 49 52 45 41 44 20 20 20 20 20 20 20 ┆_ e_ n S_IREAD ┆ 0x1620…1640 72 65 61 64 20 70 65 72 6d 69 73 73 69 6f 6e 2c 20 6f 77 6e 65 72 0a 20 20 20 20 20 20 20 20 20 ┆read permission, owner ┆ 0x1640…1660 20 20 53 5f 49 57 52 49 54 45 20 20 20 20 20 20 77 72 69 74 65 20 70 65 72 6d 69 73 73 69 6f 6e ┆ S_IWRITE write permission┆ 0x1660…1680 2c 20 6f 77 6e 65 72 0a 20 20 20 20 20 20 20 20 20 20 20 53 5f 49 45 58 45 43 20 20 20 20 20 20 ┆, owner S_IEXEC ┆ 0x1680…16a0 20 65 78 65 63 75 74 65 20 70 65 72 6d 69 73 73 69 6f 6e 2c 20 6f 77 6e 65 72 0a 20 20 20 20 20 ┆ execute permission, owner ┆ 0x16a0…16c0 54 68 65 20 6f 77 6e 65 72 27 73 20 72 65 61 64 2c 20 77 72 69 74 65 20 61 6e 64 20 65 78 65 63 ┆The owner's read, write and exec┆ 0x16c0…16e0 75 74 65 20 70 65 72 6d 69 73 73 69 6f 6e 20 62 69 74 73 20 61 72 65 20 62 69 74 73 0a 20 20 20 ┆ute permission bits are bits ┆ 0x16e0…1700 20 20 38 2c 20 37 20 61 6e 64 20 36 2c 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e 20 54 6f 20 73 ┆ 8, 7 and 6, respectively. To s┆ 0x1700…1720 65 74 20 67 72 6f 75 70 20 61 6e 64 20 70 75 62 6c 69 63 20 70 65 72 6d 69 73 2d 0a 20 20 20 20 ┆et group and public permis- ┆ 0x1720…1740 20 73 69 6f 6e 73 2c 20 73 68 69 66 74 20 74 68 65 20 6f 77 6e 65 72 27 73 20 61 63 63 65 73 73 ┆ sions, shift the owner's access┆ 0x1740…1760 20 76 61 6c 75 65 73 20 72 69 67 68 74 20 33 20 61 6e 64 20 36 20 62 69 74 73 2c 0a 20 20 20 20 ┆ values right 3 and 6 bits, ┆ 0x1760…1780 20 72 65 73 70 65 63 74 69 76 65 6c 79 2e 20 20 46 6f 72 20 67 72 6f 75 70 20 72 65 61 64 20 70 ┆ respectively. For group read p┆ 0x1780…17a0 65 72 6d 69 73 73 69 6f 6e 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 6d 6f 64 65 20 3d 20 6d 6f 64 ┆ermission: mode = mod┆ 0x17a0…17c0 65 20 7c 20 28 53 5f 49 52 45 41 44 20 3e 3e 20 33 29 0a 0a 20 20 20 20 20 46 6f 72 20 70 75 62 ┆e | (S_IREAD >> 3) For pub┆ 0x17c0…17e0 6c 69 63 20 72 65 61 64 20 70 65 72 6d 69 73 73 69 6f 6e 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 ┆lic read permission: ┆ 0x17e0…1800 6d 6f 64 65 20 3d 20 6d 6f 64 65 20 7c 20 28 53 5f 49 52 45 41 44 20 3e 3e 20 36 29 0a 0a 20 20 ┆mode = mode | (S_IREAD >> 6) ┆ 0x1800…1820 20 20 20 54 68 65 20 39 20 66 69 6c 65 2d 70 72 6f 74 65 63 74 69 6f 6e 20 62 69 74 73 20 6f 66 ┆ The 9 file-protection bits of┆ 0x1820…1840 20 74 68 65 20 6d 6f 64 65 20 61 72 65 20 6d 6f 64 69 66 69 65 64 20 62 79 20 74 68 65 0a 20 20 ┆ the mode are modified by the ┆ 0x1840…1860 20 20 20 70 72 6f 63 65 73 73 27 73 20 75 6d 61 73 6b 20 76 61 6c 75 65 2e 20 20 54 68 65 20 62 ┆ process's umask value. The b┆ 0x1860…1880 69 74 73 20 61 72 65 20 5f 08 61 5f 08 6e 5f 08 64 65 64 20 77 69 74 68 20 74 68 65 20 63 6f 6d ┆its are _ a_ n_ ded with the com┆ 0x1880…18a0 70 6c 65 2d 0a 20 20 20 20 20 6d 65 6e 74 20 6f 66 20 74 68 65 20 75 6d 61 73 6b 20 76 61 6c 75 ┆ple- ment of the umask valu┆ 0x18a0…18c0 65 2e 20 20 54 68 69 73 20 6f 70 65 72 61 74 69 6f 6e 20 61 6c 6c 6f 77 73 20 75 73 65 72 73 20 ┆e. This operation allows users ┆ 0x18c0…18e0 74 6f 0a 20 20 20 20 20 69 6e 63 72 65 61 73 65 20 70 72 6f 74 65 63 74 69 6f 6e 20 6f 6e 20 74 ┆to increase protection on t┆ 0x18e0…1900 68 65 20 63 72 65 61 74 65 64 20 66 69 6c 65 2c 20 62 75 74 20 70 72 65 76 65 6e 74 73 0a 0a 0a ┆he created file, but prevents ┆ 0x1900…1920 0a 0a 0a 0a 20 20 20 20 20 64 65 63 72 65 61 73 65 64 20 70 72 6f 74 65 63 74 69 6f 6e 2e 20 20 ┆ decreased protection. ┆ […truncated at 200 lines…]