|
|
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: p
Length: 2679 (0xa77)
Names: »popen.3«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/man/cat3/popen.3«
0x000…020 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_┆ 0x020…040 08 75 5f 08 61 5f 08 6c 20 20 20 20 20 20 20 20 20 20 20 4c 69 62 72 61 72 79 20 46 75 6e 63 74 ┆ u_ a_ l Library Funct┆ 0x040…060 69 6f 6e 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 70 6f 70 65 6e 28 33 29 0a 0a 0a 0a ┆ions popen(3) ┆ 0x060…080 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 ┆ 0x080…0a0 20 20 70 6f 70 65 6e 2c 20 70 63 6c 6f 73 65 20 2d 20 69 6e 69 74 69 61 74 65 20 49 2f 4f 20 74 ┆ popen, pclose - initiate I/O t┆ 0x0a0…0c0 6f 2f 66 72 6f 6d 20 61 20 70 72 6f 63 65 73 73 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 ┆o/from a process S S S SY Y Y Y┆ 0x0c0…0e0 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 08 58 0a 20 20 20 ┆N N N NT T T TA A A AX X X X ┆ 0x0e0…100 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 08 63 6c 08 ┆ # # # #i i i in n n nc c c cl ┆ 0x100…120 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 08 3c 08 3c ┆l l lu u u ud d d de e e e < < <┆ 0x120…140 08 3c 73 08 73 08 73 08 73 74 08 74 08 74 08 74 64 08 64 08 64 08 64 69 08 69 08 69 08 69 6f 08 ┆ <s s s st t t td d d di i i io ┆ 0x140…160 6f 08 6f 08 6f 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 20 ┆o o o. . . .h h h h> > > > ┆ 0x160…180 20 46 08 46 08 46 08 46 49 08 49 08 49 08 49 4c 08 4c 08 4c 08 4c 45 08 45 08 45 08 45 20 2a 08 ┆ F F F FI I I IL L L LE E E E * ┆ 0x180…1a0 2a 08 2a 08 2a 70 08 70 08 70 08 70 6f 08 6f 08 6f 08 6f 70 08 70 08 70 08 70 65 08 65 08 65 08 ┆* * *p p p po o o op p p pe e e ┆ 0x1a0…1c0 65 6e 08 6e 08 6e 08 6e 28 08 28 08 28 08 28 63 08 63 08 63 08 63 6f 08 6f 08 6f 08 6f 6d 08 6d ┆en n n n( ( ( (c c c co o o om m┆ 0x1c0…1e0 08 6d 08 6d 6d 08 6d 08 6d 08 6d 61 08 61 08 61 08 61 6e 08 6e 08 6e 08 6e 64 08 64 08 64 08 64 ┆ m mm m m ma a a an n n nd d d d┆ 0x1e0…200 2c 08 2c 08 2c 08 2c 20 74 08 74 08 74 08 74 79 08 79 08 79 08 79 70 08 70 08 70 08 70 65 08 65 ┆, , , , t t t ty y y yp p p pe e┆ 0x200…220 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 08 68 61 ┆ e e) ) ) ) c c c ch h h ha┆ 0x220…240 08 61 08 61 08 61 72 08 72 08 72 08 72 20 2a 08 2a 08 2a 08 2a 63 08 63 08 63 08 63 6f 08 6f 08 ┆ a a ar r r r * * * *c c c co o ┆ 0x240…260 6f 08 6f 6d 08 6d 08 6d 08 6d 6d 08 6d 08 6d 08 6d 61 08 61 08 61 08 61 6e 08 6e 08 6e 08 6e 64 ┆o om m m mm m m ma a a an n n nd┆ 0x260…280 08 64 08 64 08 64 2c 08 2c 08 2c 08 2c 20 2a 08 2a 08 2a 08 2a 74 08 74 08 74 08 74 79 08 79 08 ┆ d d d, , , , * * * *t t t ty y ┆ 0x280…2a0 79 08 79 70 08 70 08 70 08 70 65 08 65 08 65 08 65 3b 08 3b 08 3b 08 3b 0a 0a 20 20 20 20 20 70 ┆y yp p p pe e e e; ; ; ; p┆ 0x2a0…2c0 08 70 08 70 08 70 63 08 63 08 63 08 63 6c 08 6c 08 6c 08 6c 6f 08 6f 08 6f 08 6f 73 08 73 08 73 ┆ p p pc c c cl l l lo o o os s s┆ 0x2c0…2e0 08 73 65 08 65 08 65 08 65 28 08 28 08 28 08 28 73 08 73 08 73 08 73 74 08 74 08 74 08 74 72 08 ┆ se e e e( ( ( (s s s st t t tr ┆ 0x2e0…300 72 08 72 08 72 65 08 65 08 65 08 65 61 08 61 08 61 08 61 6d 08 6d 08 6d 08 6d 29 08 29 08 29 08 ┆r r re e e ea a a am m m m) ) ) ┆ 0x300…320 29 0a 20 20 20 20 20 46 08 46 08 46 08 46 49 08 49 08 49 08 49 4c 08 4c 08 4c 08 4c 45 08 45 08 ┆) F F F FI I I IL L L LE E ┆ 0x320…340 45 08 45 20 2a 08 2a 08 2a 08 2a 73 08 73 08 73 08 73 74 08 74 08 74 08 74 72 08 72 08 72 08 72 ┆E E * * * *s s s st t t tr r r r┆ 0x340…360 65 08 65 08 65 08 65 61 08 61 08 61 08 61 6d 08 6d 08 6d 08 6d 3b 08 3b 08 3b 08 3b 0a 0a 44 08 ┆e e e ea a a am m m m; ; ; ; D ┆ 0x360…380 44 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 ┆D D DE E E ES S S SC C C CR R R ┆ 0x380…3a0 52 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 ┆RI I I IP P P PT T T TI I I IO O┆ 0x3a0…3c0 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20 20 20 54 68 65 20 61 72 67 75 6d 65 6e 74 73 20 74 ┆ O ON N N N The arguments t┆ 0x3c0…3e0 6f 20 5f 08 70 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 61 72 65 20 70 6f 69 6e 74 65 72 73 20 74 ┆o _ p_ o_ p_ e_ n are pointers t┆ 0x3e0…400 6f 20 6e 75 6c 6c 2d 74 65 72 6d 69 6e 61 74 65 64 0a 20 20 20 20 20 73 74 72 69 6e 67 73 20 63 ┆o null-terminated strings c┆ 0x400…420 6f 6e 74 61 69 6e 69 6e 67 20 72 65 73 70 65 63 74 69 76 65 6c 79 20 61 20 73 68 65 6c 6c 20 63 ┆ontaining respectively a shell c┆ 0x420…440 6f 6d 6d 61 6e 64 20 6c 69 6e 65 20 61 6e 64 20 61 6e 0a 20 20 20 20 20 49 2f 4f 20 6d 6f 64 65 ┆ommand line and an I/O mode┆ 0x440…460 2c 20 65 69 74 68 65 72 20 22 72 22 20 66 6f 72 20 72 65 61 64 69 6e 67 20 6f 72 20 22 77 22 20 ┆, either "r" for reading or "w" ┆ 0x460…480 66 6f 72 20 77 72 69 74 69 6e 67 2e 20 20 49 74 0a 20 20 20 20 20 63 72 65 61 74 65 73 20 61 20 ┆for writing. It creates a ┆ 0x480…4a0 70 69 70 65 20 62 65 74 77 65 65 6e 20 74 68 65 20 63 61 6c 6c 69 6e 67 20 70 72 6f 63 65 73 73 ┆pipe between the calling process┆ 0x4a0…4c0 20 61 6e 64 20 74 68 65 20 63 6f 6d 6d 61 6e 64 0a 20 20 20 20 20 74 6f 20 62 65 20 65 78 65 63 ┆ and the command to be exec┆ 0x4c0…4e0 75 74 65 64 2e 20 20 54 68 65 20 76 61 6c 75 65 20 72 65 74 75 72 6e 65 64 20 69 73 20 61 20 73 ┆uted. The value returned is a s┆ 0x4e0…500 74 72 65 61 6d 20 70 6f 69 6e 74 65 72 20 74 68 61 74 0a 20 20 20 20 20 63 61 6e 20 62 65 20 75 ┆tream pointer that can be u┆ 0x500…520 73 65 64 20 28 61 73 20 61 70 70 72 6f 70 72 69 61 74 65 29 20 74 6f 20 77 72 69 74 65 20 74 6f ┆sed (as appropriate) to write to┆ 0x520…540 20 74 68 65 20 73 74 61 6e 64 61 72 64 20 69 6e 70 75 74 0a 20 20 20 20 20 6f 66 20 74 68 65 20 ┆ the standard input of the ┆ 0x540…560 63 6f 6d 6d 61 6e 64 20 6f 72 20 72 65 61 64 20 66 72 6f 6d 20 69 74 73 20 73 74 61 6e 64 61 72 ┆command or read from its standar┆ 0x560…580 64 20 6f 75 74 70 75 74 2e 0a 0a 20 20 20 20 20 41 20 73 74 72 65 61 6d 20 6f 70 65 6e 65 64 20 ┆d output. A stream opened ┆ 0x580…5a0 62 79 20 5f 08 70 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 73 68 6f 75 6c 64 20 62 65 20 63 6c 6f ┆by _ p_ o_ p_ e_ n should be clo┆ 0x5a0…5c0 73 65 64 20 62 79 20 5f 08 70 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 2c 20 77 68 69 63 68 ┆sed by _ p_ c_ l_ o_ s_ e, which┆ 0x5c0…5e0 0a 20 20 20 20 20 77 61 69 74 73 20 66 6f 72 20 74 68 65 20 61 73 73 6f 63 69 61 74 65 64 20 70 ┆ waits for the associated p┆ 0x5e0…600 72 6f 63 65 73 73 20 74 6f 20 74 65 72 6d 69 6e 61 74 65 20 61 6e 64 20 72 65 74 75 72 6e 73 0a ┆rocess to terminate and returns ┆ 0x600…620 20 20 20 20 20 74 68 65 20 65 78 69 74 20 73 74 61 74 75 73 20 6f 66 20 74 68 65 20 63 6f 6d 6d ┆ the exit status of the comm┆ 0x620…640 61 6e 64 2e 0a 0a 20 20 20 20 20 42 65 63 61 75 73 65 20 6f 70 65 6e 20 66 69 6c 65 73 20 61 72 ┆and. Because open files ar┆ 0x640…660 65 20 73 68 61 72 65 64 2c 20 61 20 74 79 70 65 20 22 72 22 20 63 6f 6d 6d 61 6e 64 20 6d 61 79 ┆e shared, a type "r" command may┆ 0x660…680 20 62 65 0a 20 20 20 20 20 75 73 65 64 20 61 73 20 61 6e 20 69 6e 70 75 74 20 66 69 6c 74 65 72 ┆ be used as an input filter┆ 0x680…6a0 2c 20 61 6e 64 20 61 20 74 79 70 65 20 22 77 22 20 61 73 20 61 6e 20 6f 75 74 70 75 74 20 66 69 ┆, and a type "w" as an output fi┆ 0x6a0…6c0 6c 74 65 72 2e 0a 0a 53 08 53 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 08 45 20 41 08 41 ┆lter. S S S SE E E EE E E E A A┆ 0x6c0…6e0 08 41 08 41 4c 08 4c 08 4c 08 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f 0a 20 20 20 20 20 55 ┆ A AL L L LS S S SO O O O U┆ 0x6e0…700 73 65 72 20 43 6f 6d 6d 61 6e 64 73 20 28 31 29 3a 20 20 73 68 0a 20 20 20 20 20 53 79 73 74 65 ┆ser Commands (1): sh Syste┆ 0x700…720 6d 20 43 61 6c 6c 73 20 28 32 29 3a 20 20 70 69 70 65 2c 20 77 61 69 74 0a 20 20 20 20 20 4c 69 ┆m Calls (2): pipe, wait Li┆ 0x720…740 62 72 61 72 79 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 20 66 6f 70 65 6e 2c 20 66 63 6c ┆brary Functions (3): fopen, fcl┆ 0x740…760 6f 73 65 2c 20 73 79 73 74 65 6d 0a 0a 44 08 44 08 44 08 44 49 08 49 08 49 08 49 41 08 41 08 41 ┆ose, system D D D DI I I IA A A┆ 0x760…780 08 41 47 08 47 08 47 08 47 4e 08 4e 08 4e 08 4e 4f 08 4f 08 4f 08 4f 53 08 53 08 53 08 53 54 08 ┆ AG G G GN N N NO O O OS S S ST ┆ 0x780…7a0 54 08 54 08 54 49 08 49 08 49 08 49 43 08 43 08 43 08 43 53 08 53 08 53 08 53 0a 20 20 20 20 20 ┆T T TI I I IC C C CS S S S ┆ 0x7a0…7c0 5f 08 70 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 72 65 74 75 72 6e 73 20 61 20 6e 75 6c 6c 20 70 ┆_ p_ o_ p_ e_ n returns a null p┆ 0x7c0…7e0 6f 69 6e 74 65 72 20 69 66 20 66 69 6c 65 73 20 6f 72 20 70 72 6f 63 65 73 73 65 73 20 63 61 6e ┆ointer if files or processes can┆ 0x7e0…800 6e 6f 74 20 62 65 0a 20 20 20 20 20 63 72 65 61 74 65 64 2c 20 6f 72 20 74 68 65 20 73 68 65 6c ┆not be created, or the shel┆ 0x800…820 6c 20 63 61 6e 6e 6f 74 20 62 65 20 61 63 63 65 73 73 65 64 2e 0a 0a 20 20 20 20 20 5f 08 70 5f ┆l cannot be accessed. _ p_┆ 0x820…840 08 63 5f 08 6c 5f 08 6f 5f 08 73 5f 08 65 20 72 65 74 75 72 6e 73 20 2d 31 20 69 66 20 5f 08 73 ┆ c_ l_ o_ s_ e returns -1 if _ s┆ 0x840…860 5f 08 74 5f 08 72 5f 08 65 5f 08 61 5f 08 6d 20 69 73 20 6e 6f 74 20 61 73 73 6f 63 69 61 74 65 ┆_ t_ r_ e_ a_ m is not associate┆ 0x860…880 64 20 77 69 74 68 20 61 0a 20 20 20 20 20 60 70 6f 70 65 6e 65 64 27 20 63 6f 6d 6d 61 6e 64 2e ┆d with a `popened' command.┆ 0x880…8a0 0a 0a 4c 08 4c 08 4c 08 4c 49 08 49 08 49 08 49 4d 08 4d 08 4d 08 4d 49 08 49 08 49 08 49 54 08 ┆ L L L LI I I IM M M MI I I IT ┆ 0x8a0…8c0 54 08 54 08 54 41 08 41 08 41 08 41 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 ┆T T TA A A AT T T TI I I IO O O ┆ 0x8c0…8e0 4f 4e 08 4e 08 4e 08 4e 53 08 53 08 53 08 53 0a 20 20 20 20 20 42 75 66 66 65 72 65 64 20 72 65 ┆ON N N NS S S S Buffered re┆ 0x8e0…900 61 64 69 6e 67 20 62 65 66 6f 72 65 20 6f 70 65 6e 69 6e 67 20 61 6e 20 69 6e 70 75 74 20 66 69 ┆ading before opening an input fi┆ 0x900…920 6c 74 65 72 20 6d 61 79 20 6c 65 61 76 65 0a 20 20 20 20 20 74 68 65 20 73 74 61 6e 64 61 72 64 ┆lter may leave the standard┆ 0x920…940 20 69 6e 70 75 74 20 6f 66 20 74 68 61 74 20 66 69 6c 74 65 72 20 6d 69 73 70 6f 73 69 74 69 6f ┆ input of that filter mispositio┆ 0x940…960 6e 65 64 2e 20 20 53 69 6d 69 6c 61 72 0a 20 20 20 20 20 70 72 6f 62 6c 65 6d 73 20 77 69 74 68 ┆ned. Similar problems with┆ 0x960…980 20 61 6e 20 6f 75 74 70 75 74 20 66 69 6c 74 65 72 20 6d 61 79 20 62 65 20 66 6f 72 65 73 74 61 ┆ an output filter may be foresta┆ 0x980…9a0 6c 6c 65 64 20 62 79 20 63 61 72 65 66 75 6c 0a 20 20 20 20 20 62 75 66 66 65 72 20 66 6c 75 73 ┆lled by careful buffer flus┆ 0x9a0…9c0 68 69 6e 67 2c 20 66 6f 72 20 69 6e 73 74 61 6e 63 65 2c 20 77 69 74 68 20 5f 08 66 5f 08 66 5f ┆hing, for instance, with _ f_ f_┆ 0x9c0…9e0 08 6c 5f 08 75 5f 08 73 5f 08 68 2c 20 73 65 65 20 5f 08 66 5f 08 63 5f 08 6c 5f 08 6f 5f 08 73 ┆ l_ u_ s_ h, see _ f_ c_ l_ o_ s┆ 0x9e0…a00 5f 08 65 28 33 29 2e 0a 0a 20 20 20 20 20 5f 08 70 5f 08 6f 5f 08 70 5f 08 65 5f 08 6e 20 61 6c ┆_ e(3). _ p_ o_ p_ e_ n al┆ 0xa00…a20 77 61 79 73 20 63 61 6c 6c 73 20 5f 08 73 5f 08 68 2c 20 6e 65 76 65 72 20 63 61 6c 6c 73 20 5f ┆ways calls _ s_ h, never calls _┆ 0xa20…a40 08 63 5f 08 73 5f 08 68 2e 0a 0a 4d 61 72 63 68 20 31 39 38 39 20 20 20 20 20 20 20 20 20 20 20 ┆ c_ s_ h. March 1989 ┆ 0xa40…a60 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 72 ┆ TX Programmer┆ 0xa60…a77 27 73 20 52 65 66 65 72 65 6e 63 65 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a ┆'s Reference ┆