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

⟦c1016b5de⟧

    Length: 2878 (0xb3e)
    Names: »getpid.2«

Derivation

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

Default Hex Dump

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 20 20 53 79 73 74 65 6d 20 43 61 6c 6c   ┆ u_ a_ l             System Call┆
0x040…060 73 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 67 65 74 70 69 64 28 32 29 0a 0a 0a 0a   ┆s                  getpid(2)    ┆
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 67 65 74 70 69 64 2c 20 67 65 74 70 70 69 64 20 2d 20 67 65 74 20 70 72 6f 63 65 73 73 20   ┆  getpid, getppid - get process ┆
0x0a0…0c0 69 64 65 6e 74 69 66 69 63 61 74 69 6f 6e 0a 0a 53 08 53 08 53 08 53 59 08 59 08 59 08 59 4e 08   ┆identification  S S S SY Y Y YN ┆
0x0c0…0e0 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 20   ┆N N NT T T TA A A AX X X X      ┆
0x0e0…100 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 ┆
0x100…120 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 < < < <┆
0x120…140 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 70 08 70 08   ┆s s s sy y y ys s s s/ / / /p p ┆
0x140…160 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 2e 08 2e 08 2e 08 2e 68 08 68 08 68 08 68 3e   ┆p pi i i id d d d. . . .h h h h>┆
0x160…180 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 6e 08   ┆ > > >      # # # #i i i in n n ┆
0x180…1a0 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 08 65   ┆nc c c cl l l lu u u ud d d de e┆
0x1a0…1c0 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 73 08   ┆ e e < < < <s s s sy y y ys s s ┆
0x1c0…1e0 73 2f 08 2f 08 2f 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   ┆s/ / / /t t t ty y y yp p p pe e┆
0x1e0…200 08 65 08 65 73 08 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   ┆ e es s s s. . . .h h h h> > > >┆
0x200…220 0a 0a 20 20 20 20 20 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 5f 08 5f 08   ┆       p p p pi i i id d d d_ _ ┆
0x220…240 5f 08 5f 74 08 74 08 74 08 74 20 67 08 67 08 67 08 67 65 08 65 08 65 08 65 74 08 74 08 74 08 74   ┆_ _t t t t g g g ge e e et t t t┆
0x240…260 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 28 08 28 08 28 08 28 29 08 29 08   ┆p p p pi i i id d d d( ( ( () ) ┆
0x260…280 29 08 29 0a 0a 20 20 20 20 20 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 5f   ┆) )       p p p pi i i id d d d_┆
0x280…2a0 08 5f 08 5f 08 5f 74 08 74 08 74 08 74 20 67 08 67 08 67 08 67 65 08 65 08 65 08 65 74 08 74 08   ┆ _ _ _t t t t g g g ge e e et t ┆
0x2a0…2c0 74 08 74 70 08 70 08 70 08 70 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 28   ┆t tp p p pp p p pi i i id d d d(┆
0x2c0…2e0 08 28 08 28 08 28 29 08 29 08 29 08 29 0a 0a 44 08 44 08 44 08 44 45 08 45 08 45 08 45 53 08 53   ┆ ( ( () ) ) )  D D D DE E E ES S┆
0x2e0…300 08 53 08 53 43 08 43 08 43 08 43 52 08 52 08 52 08 52 49 08 49 08 49 08 49 50 08 50 08 50 08 50   ┆ S SC C C CR R R RI I I IP P P P┆
0x300…320 54 08 54 08 54 08 54 49 08 49 08 49 08 49 4f 08 4f 08 4f 08 4f 4e 08 4e 08 4e 08 4e 0a 20 20 20   ┆T T T TI I I IO O O ON N N N    ┆
0x320…340 20 20 5f 08 67 5f 08 65 5f 08 74 5f 08 70 5f 08 69 5f 08 64 20 72 65 74 75 72 6e 73 20 74 68 65   ┆  _ g_ e_ t_ p_ i_ d returns the┆
0x340…360 20 70 72 6f 63 65 73 73 20 49 44 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f 63 65   ┆ process ID of the current proce┆
0x360…380 73 73 2e 0a 0a 20 20 20 20 20 5f 08 67 5f 08 65 5f 08 74 5f 08 70 5f 08 70 5f 08 69 5f 08 64 20   ┆ss.       _ g_ e_ t_ p_ p_ i_ d ┆
0x380…3a0 72 65 74 75 72 6e 73 20 74 68 65 20 70 61 72 65 6e 74 27 73 20 70 72 6f 63 65 73 73 20 49 44 20   ┆returns the parent's process ID ┆
0x3a0…3c0 66 6f 72 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f 2d 0a 20 20 20 20 20 63 65 73 73 2e 0a   ┆for the current pro-      cess. ┆
0x3c0…3e0 0a 20 20 20 20 20 54 68 65 20 76 61 6c 75 65 20 72 65 74 75 72 6e 65 64 20 73 68 6f 75 6c 64 20   ┆      The value returned should ┆
0x3e0…400 62 65 20 69 6e 74 65 72 70 72 65 74 65 64 20 61 73 20 61 20 32 2d 70 61 72 74 20 49 44 20 63 6f   ┆be interpreted as a 2-part ID co┆
0x400…420 6e 2d 0a 20 20 20 20 20 73 69 73 74 69 6e 67 20 6f 66 20 74 68 65 20 50 55 2d 6e 75 6d 62 65 72   ┆n-      sisting of the PU-number┆
0x420…440 20 61 6e 64 20 61 20 70 72 6f 63 65 73 73 20 69 64 65 6e 74 69 66 69 65 72 2c 20 61 73 73 69 67   ┆ and a process identifier, assig┆
0x440…460 6e 65 64 0a 20 20 20 20 20 6c 6f 63 61 6c 6c 79 2e 20 20 57 68 65 6e 20 61 20 70 72 6f 63 65 73   ┆ned      locally.  When a proces┆
0x460…480 73 20 69 73 20 72 65 73 74 61 72 74 65 64 20 28 61 66 74 65 72 20 50 55 20 74 61 6b 65 6f 76 65   ┆s is restarted (after PU takeove┆
0x480…4a0 72 29 2c 0a 20 20 20 20 20 74 68 65 20 49 44 20 28 69 6e 63 6c 75 64 69 6e 67 20 74 68 65 20 50   ┆r),      the ID (including the P┆
0x4a0…4c0 55 20 6e 75 6d 62 65 72 29 20 6d 61 79 20 62 65 20 64 69 66 66 65 72 65 6e 74 2e 0a 0a 20 20 20   ┆U number) may be different.     ┆
0x4c0…4e0 20 20 54 68 69 73 20 63 61 6c 6c 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 20 67 65 6e 65 72   ┆  This call can be used to gener┆
0x4e0…500 61 74 65 20 75 6e 69 71 75 65 6c 79 2d 6e 61 6d 65 64 20 74 65 6d 70 6f 72 61 72 79 0a 20 20 20   ┆ate uniquely-named temporary    ┆
0x500…520 20 20 66 69 6c 65 73 2e 0a 0a 20 20 20 20 20 5f 08 70 5f 08 69 5f 08 64 73 20 73 68 6f 75 6c 64   ┆  files.       _ p_ i_ ds should┆
0x520…540 20 62 65 20 6d 61 6e 69 70 75 6c 61 74 65 64 20 61 73 20 69 6e 74 65 67 65 72 73 20 28 69 08 69   ┆ be manipulated as integers (i i┆
0x540…560 08 69 08 69 6e 08 6e 08 6e 08 6e 74 08 74 08 74 08 74 73 29 2c 20 77 69 74 68 6f 75 74 0a 20 20   ┆ i in n n nt t t ts), without   ┆
0x560…580 20 20 20 72 65 67 61 72 64 20 74 6f 20 74 68 65 69 72 20 69 6e 74 65 72 6e 61 6c 20 66 6f 72 6d   ┆   regard to their internal form┆
0x580…5a0 61 74 2e 20 20 41 6c 74 65 72 6e 61 74 69 76 65 6c 79 2c 20 74 68 65 0a 20 20 20 20 20 3c 08 3c   ┆at.  Alternatively, the      < <┆
0x5a0…5c0 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 08 2f   ┆ < <s s s sy y y ys s s s/ / / /┆
0x5c0…5e0 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 2e 08 2e 08 2e 08 2e 68 08 68 08   ┆p p p pi i i id d d d. . . .h h ┆
0x5e0…600 68 08 68 3e 08 3e 08 3e 08 3e 20 66 69 6c 65 20 64 65 66 69 6e 65 73 20 73 6f 6d 65 20 6d 61 63   ┆h h> > > > file defines some mac┆
0x600…620 72 6f 73 20 74 68 61 74 20 63 61 6e 20 62 65 20 75 73 65 64 20 74 6f 0a 20 20 20 20 20 6d 61 6e   ┆ros that can be used to      man┆
0x620…640 69 70 75 6c 61 74 65 20 50 49 44 73 3b 20 68 6f 77 65 76 65 72 2c 20 74 68 65 73 65 20 61 72 65   ┆ipulate PIDs; however, these are┆
0x640…660 20 65 78 74 72 65 6d 65 6c 79 20 6e 6f 6e 70 6f 72 74 61 62 6c 65 2c 0a 20 20 20 20 20 61 6e 64   ┆ extremely nonportable,      and┆
0x660…680 20 73 68 6f 75 6c 64 20 62 65 20 75 73 65 64 20 77 69 74 68 20 63 61 72 65 2e 0a 0a 20 20 20 20   ┆ should be used with care.      ┆
0x680…6a0 20 41 20 50 49 44 20 63 61 6e 20 62 65 20 69 6e 74 65 72 70 72 65 74 65 64 20 61 73 20 74 68 65   ┆ A PID can be interpreted as the┆
0x6a0…6c0 20 66 6f 6c 6c 6f 77 69 6e 67 20 73 74 72 75 63 74 75 72 65 3a 0a 0a 20 20 20 20 20 20 20 20 20   ┆ following structure:           ┆
0x6c0…6e0 20 73 74 72 75 63 74 20 70 72 6f 63 69 64 0a 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20   ┆ struct procid           {      ┆
0x6e0…700 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 70 5f 6c 6f 63 61 6c 70 69 64 3b   ┆         short       p_localpid;┆
0x700…720 20 20 20 20 20 2f 2a 20 6c 6f 63 61 6c 20 70 69 64 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 20   ┆     /* local pid */            ┆
0x720…740 20 20 20 73 68 6f 72 74 20 20 20 20 20 20 20 70 5f 6d 79 5f 70 75 69 64 3b 20 20 20 20 20 20 2f   ┆   short       p_my_puid;      /┆
0x740…760 2a 20 63 72 65 61 74 69 6e 67 20 70 75 27 73 20 49 44 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20   ┆* creating pu's ID */           ┆
0x760…780 7d 3b 0a 0a 0a 20 20 20 20 20 54 48 65 20 66 6f 6c 6c 6f 77 69 6e 67 20 74 77 6f 20 6d 61 63 72   ┆};        THe following two macr┆
0x780…7a0 6f 73 20 6d 61 79 20 62 65 20 75 73 65 64 20 74 6f 20 65 78 74 72 61 63 74 20 74 68 65 20 49 44   ┆os may be used to extract the ID┆
0x7a0…7c0 20 6f 66 0a 20 20 20 20 20 74 68 65 20 63 72 65 61 74 69 6e 67 20 50 55 20 61 6e 64 20 74 68 65   ┆ of      the creating PU and the┆
0x7c0…7e0 20 6c 6f 63 61 6c 20 50 49 44 20 6f 6e 20 74 68 61 74 20 50 55 2c 20 72 65 73 70 65 63 74 69 76   ┆ local PID on that PU, respectiv┆
0x7e0…800 65 6c 79 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 23 64 65 66 69 6e 65 20 50 49 44 54 4f 50 55 28   ┆ely:            #define PIDTOPU(┆
0x800…820 70 69 64 29 20 20 20 20 20 20 20 20 20 20 20 20 28 28 28 73 74 72 75 63 74 20 70 72 6f 63 69 64   ┆pid)            (((struct procid┆
0x820…840 20 2a 29 26 28 70 69 64 29 29 2d 3e 70 5f 6d 79 5f 70 75 69 64 29 0a 20 20 20 20 20 20 20 20 20   ┆ *)&(pid))->p_my_puid)          ┆
0x840…860 20 23 64 65 66 69 6e 65 20 50 49 44 54 4f 4c 50 49 44 28 70 69 64 29 20 20 20 20 20 20 20 20 20   ┆ #define PIDTOLPID(pid)         ┆
0x860…880 20 28 28 28 73 74 72 75 63 74 20 70 72 6f 63 69 64 20 2a 29 26 28 70 69 64 29 29 2d 3e 70 5f 6c   ┆ (((struct procid *)&(pid))->p_l┆
0x880…8a0 6f 63 61 6c 70 69 64 29 0a 0a 0a 20 20 20 20 20 54 68 65 20 6c 69 62 72 61 72 79 20 66 75 6e 63   ┆ocalpid)        The library func┆
0x8a0…8c0 74 69 6f 6e 73 20 5f 08 70 5f 08 69 5f 08 64 5f 08 66 5f 08 72 5f 08 6f 5f 08 6d 5f 08 73 5f 08   ┆tions _ p_ i_ d_ f_ r_ o_ m_ s_ ┆
0x8c0…8e0 74 5f 08 72 5f 08 69 5f 08 6e 5f 08 67 20 61 6e 64 20 5f 08 70 5f 08 69 5f 08 64 5f 08 74 5f 08   ┆t_ r_ i_ n_ g and _ p_ i_ d_ t_ ┆
0x8e0…900 6f 5f 08 73 5f 08 74 5f 08 72 5f 08 69 5f 08 6e 5f 08 67 20 61 72 65 20 70 72 6f 2d 0a 20 20 20   ┆o_ s_ t_ r_ i_ n_ g are pro-    ┆
0x900…920 20 20 76 69 64 65 64 20 66 6f 72 20 63 6f 6e 76 65 72 73 69 6f 6e 20 62 65 74 77 65 65 6e 20 50   ┆  vided for conversion between P┆
0x920…940 49 44 73 20 61 6e 64 20 41 53 43 49 49 20 73 74 72 69 6e 67 73 2e 0a 0a 52 08 52 08 52 08 52 45   ┆IDs and ASCII strings.  R R R RE┆
0x940…960 08 45 08 45 08 45 54 08 54 08 54 08 54 55 08 55 08 55 08 55 52 08 52 08 52 08 52 4e 08 4e 08 4e   ┆ E E ET T T TU U U UR R R RN N N┆
0x960…980 08 4e 20 56 08 56 08 56 08 56 41 08 41 08 41 08 41 4c 08 4c 08 4c 08 4c 55 08 55 08 55 08 55 45   ┆ N V V V VA A A AL L L LU U U UE┆
0x980…9a0 08 45 08 45 08 45 0a 20 20 20 20 20 54 68 65 20 5f 08 67 5f 08 65 5f 08 74 5f 08 70 5f 08 69 5f   ┆ E E E      The _ g_ e_ t_ p_ i_┆
0x9a0…9c0 08 64 28 29 20 61 6e 64 20 5f 08 67 5f 08 65 5f 08 74 5f 08 70 5f 08 70 5f 08 69 5f 08 64 28 29   ┆ d() and _ g_ e_ t_ p_ p_ i_ d()┆
0x9c0…9e0 20 66 75 6e 63 74 69 6f 6e 73 20 61 72 65 20 61 6c 77 61 79 73 20 73 75 63 63 65 73 73 66 75 6c   ┆ functions are always successful┆
0x9e0…a00 0a 20 20 20 20 20 61 6e 64 20 6e 6f 20 72 65 74 75 72 6e 20 76 61 6c 75 65 73 20 61 72 65 20 72   ┆      and no return values are r┆
0xa00…a20 65 73 65 72 76 65 64 20 74 6f 20 69 6e 64 69 63 61 74 65 20 65 72 72 6f 72 73 2e 0a 0a 53 08 53   ┆eserved to indicate errors.  S S┆
0xa20…a40 08 53 08 53 45 08 45 08 45 08 45 45 08 45 08 45 08 45 20 41 08 41 08 41 08 41 4c 08 4c 08 4c 08   ┆ S SE E E EE E E E A A A AL L L ┆
0xa40…a60 4c 53 08 53 08 53 08 53 4f 08 4f 08 4f 08 4f 0a 20 20 20 20 20 53 79 73 74 65 6d 20 43 61 6c 6c   ┆LS S S SO O O O      System Call┆
0xa60…a80 73 20 28 32 29 3a 20 20 67 65 74 68 6f 73 74 69 64 2c 20 67 65 74 70 75 69 64 0a 20 20 20 20 20   ┆s (2):  gethostid, getpuid      ┆
0xa80…aa0 4c 69 62 72 61 72 79 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 70 69 64 66 72 6f 6d 73 74   ┆Library Functions (3): pidfromst┆
0xaa0…ac0 69 6e 67 2c 20 70 69 64 74 6f 73 74 72 69 6e 67 2c 20 6d 6b 74 65 6d 70 0a 0a 44 65 63 65 6d 62   ┆ing, pidtostring, mktemp  Decemb┆
0xac0…ae0 65 72 20 31 39 30 30 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   ┆er 1900                         ┆
0xae0…b00 20 20 54 58 20 50 72 6f 67 72 61 6d 6d 65 72 27 73 20 52 65 66 65 72 65 6e 63 65 0a 0a 0a 0a 0a   ┆  TX Programmer's Reference     ┆
0xb00…b20 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a   ┆                                ┆
0xb20…b3e 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a 0a         ┆                              ┆