|
|
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: g
Length: 2430 (0x97e)
Names: »getpid.2«
└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
└─⟦bbf173f5c⟧ »0004«
└─⟦this⟧ »./bsd/usr/man/cat2/getpid.2«
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 70 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 ┆ > > > p p p pi i i id d d ┆
0x180…1a0 64 20 3d 08 3d 08 3d 08 3d 20 67 08 67 08 67 08 67 65 08 65 08 65 08 65 74 08 74 08 74 08 74 70 ┆d = = = = g g g ge e e et t t tp┆
0x1a0…1c0 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 20 29 08 29 08 ┆ p p pi i i id d d d( ( ( ( ) ) ┆
0x1c0…1e0 29 08 29 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 70 ┆) ) i i i in n n nt t t t p┆
0x1e0…200 08 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 3b 08 3b 08 3b 08 3b 0a 20 20 20 20 ┆ p p pi i i id d d d; ; ; ; ┆
0x200…220 20 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 20 3d 08 ┆ p p p pp p p pi i i id d d d = ┆
0x220…240 3d 08 3d 08 3d 20 67 08 67 08 67 08 67 65 08 65 08 65 08 65 74 08 74 08 74 08 74 70 08 70 08 70 ┆= = = g g g ge e e et t t tp p p┆
0x240…260 08 70 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 20 29 ┆ pp p p pi i i id d d d( ( ( ( )┆
0x260…280 08 29 08 29 08 29 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 ┆ ) ) ) i i i in n n nt t t ┆
0x280…2a0 74 20 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 3b 08 ┆t p p p pp p p pi i i id d d d; ┆
0x2a0…2c0 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 ┆
0x2c0…2e0 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┆
0x2e0…300 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 5f 08 67 5f 08 65 ┆ I I IO O O ON N N N _ g_ e┆
0x300…320 5f 08 74 5f 08 70 5f 08 69 5f 08 64 20 72 65 74 75 72 6e 73 20 74 68 65 20 70 72 6f 63 65 73 73 ┆_ t_ p_ i_ d returns the process┆
0x320…340 20 49 44 20 6f 66 20 74 68 65 20 63 75 72 72 65 6e 74 20 70 72 6f 63 65 73 73 2e 0a 0a 20 20 20 ┆ ID of the current process. ┆
0x340…360 20 20 5f 08 67 5f 08 65 5f 08 74 5f 08 70 5f 08 70 5f 08 69 5f 08 64 20 72 65 74 75 72 6e 73 20 ┆ _ g_ e_ t_ p_ p_ i_ d returns ┆
0x360…380 74 68 65 20 70 61 72 65 6e 74 27 73 20 70 72 6f 63 65 73 73 20 49 44 20 66 6f 72 20 74 68 65 20 ┆the parent's process ID for the ┆
0x380…3a0 63 75 72 72 65 6e 74 20 70 72 6f 2d 0a 20 20 20 20 20 63 65 73 73 2e 0a 0a 20 20 20 20 20 70 08 ┆current pro- cess. p ┆
0x3a0…3c0 70 08 70 08 70 69 08 69 08 69 08 69 64 08 64 08 64 08 64 20 20 54 68 65 20 76 61 6c 75 65 20 72 ┆p p pi i i id d d d The value r┆
0x3c0…3e0 65 74 75 72 6e 65 64 20 69 73 20 61 20 32 2d 70 61 72 74 20 49 44 20 63 6f 6e 73 69 73 74 69 6e ┆eturned is a 2-part ID consistin┆
0x3e0…400 67 20 6f 66 20 74 68 65 0a 20 20 20 20 20 20 20 20 20 20 50 55 2d 6e 75 6d 62 65 72 20 61 6e 64 ┆g of the PU-number and┆
0x400…420 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 6e 65 64 20 ┆ a process identifier, assigned ┆
0x420…440 6c 6f 63 61 6c 6c 79 2e 0a 20 20 20 20 20 20 20 20 20 20 57 68 65 6e 20 61 20 70 72 6f 63 65 73 ┆locally. When a proces┆
0x440…460 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┆
0x460…480 72 29 2c 20 74 68 65 20 49 44 0a 20 20 20 20 20 20 20 20 20 20 28 69 6e 63 6c 75 64 69 6e 67 20 ┆r), the ID (including ┆
0x480…4a0 74 68 65 20 50 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 ┆the PU number) may be different.┆
0x4a0…4c0 0a 0a 20 20 20 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 ┆ This call can be used to ┆
0x4c0…4e0 67 65 6e 65 72 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 ┆generate uniquely-named temporar┆
0x4e0…500 79 0a 20 20 20 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 ┆y files. _ p_ i_ ds s┆
0x500…520 68 6f 75 6c 64 20 62 65 20 6d 61 6e 69 70 75 6c 61 74 65 64 20 61 73 20 33 32 2d 62 69 74 20 69 ┆hould be manipulated as 32-bit i┆
0x520…540 6e 74 65 67 65 72 73 20 28 69 6e 74 73 29 2c 0a 20 20 20 20 20 77 69 74 68 6f 75 74 20 72 65 67 ┆ntegers (ints), without reg┆
0x540…560 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 61 74 2e 20 20 41 ┆ard to their internal format. A┆
0x560…580 6c 74 65 72 6e 61 74 69 76 65 6c 79 2c 20 74 68 65 0a 20 20 20 20 20 6d 61 63 72 6f 73 20 69 6e ┆lternatively, the macros in┆
0x580…5a0 20 3c 73 79 73 2f 70 69 64 2e 68 3e 20 63 61 6e 20 62 65 20 75 73 65 64 3b 20 68 6f 77 65 76 65 ┆ <sys/pid.h> can be used; howeve┆
0x5a0…5c0 72 2c 20 74 68 65 73 65 20 61 72 65 0a 20 20 20 20 20 65 78 74 72 65 6d 65 6c 79 20 6e 6f 6e 70 ┆r, these are extremely nonp┆
0x5c0…5e0 6f 72 74 61 62 6c 65 3a 0a 0a 20 20 20 20 20 20 20 20 20 20 23 69 66 6e 64 65 66 20 5f 50 49 44 ┆ortable: #ifndef _PID┆
0x5e0…600 5f 0a 20 20 20 20 20 20 20 20 20 20 23 64 65 66 69 6e 65 20 5f 50 49 44 5f 0a 0a 20 20 20 20 20 ┆_ #define _PID_ ┆
0x600…620 20 20 20 20 20 2f 2a 20 54 58 20 75 6e 69 71 75 65 20 77 69 74 68 69 6e 20 6c 61 6e 20 70 72 6f ┆ /* TX unique within lan pro┆
0x620…640 63 65 73 73 20 69 64 20 2a 2f 0a 0a 20 20 20 20 20 20 20 20 20 20 73 74 72 75 63 74 20 70 72 6f ┆cess id */ struct pro┆
0x640…660 63 69 64 0a 20 20 20 20 20 20 20 20 20 20 7b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 ┆cid { sh┆
0x660…680 6f 72 74 20 20 20 20 20 20 20 70 5f 6c 6f 63 61 6c 70 69 64 3b 20 20 20 20 20 2f 2a 20 6c 6f 63 ┆ort p_localpid; /* loc┆
0x680…6a0 61 6c 20 70 69 64 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 73 68 6f 72 74 20 20 20 ┆al pid */ short ┆
0x6a0…6c0 20 20 20 20 70 5f 6d 79 5f 70 75 69 64 3b 20 20 20 20 20 20 2f 2a 20 63 72 65 61 74 69 6e 67 20 ┆ p_my_puid; /* creating ┆
0x6c0…6e0 70 75 27 73 20 49 44 20 2a 2f 0a 20 20 20 20 20 20 20 20 20 20 7d 3b 0a 0a 20 20 20 20 20 20 20 ┆pu's ID */ }; ┆
0x6e0…700 20 20 20 2f 2a 20 66 6f 72 20 65 6e 63 6f 64 69 6e 67 2f 64 65 63 6f 64 69 6e 67 20 6c 61 6e 20 ┆ /* for encoding/decoding lan ┆
0x700…720 70 69 64 73 20 2a 2f 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 ┆pids */ #define PIDTO┆
0x720…740 4c 50 49 44 28 70 69 64 29 20 20 20 20 20 20 20 20 20 20 28 28 28 73 74 72 75 63 74 20 70 72 6f ┆LPID(pid) (((struct pro┆
0x740…760 63 69 64 20 2a 29 26 28 70 69 64 29 29 2d 3e 70 5f 6c 6f 63 61 6c 70 69 64 29 0a 20 20 20 20 20 ┆cid *)&(pid))->p_localpid) ┆
0x760…780 20 20 20 20 20 23 64 65 66 69 6e 65 20 50 49 44 54 4f 50 55 28 70 69 64 29 20 20 20 20 20 20 20 ┆ #define PIDTOPU(pid) ┆
0x780…7a0 20 20 20 20 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 ┆ (((struct procid *)&(pid))-┆
0x7a0…7c0 3e 70 5f 6d 79 5f 70 75 69 64 29 0a 20 20 20 20 20 20 20 20 20 20 23 64 65 66 69 6e 65 20 4d 4b ┆>p_my_puid) #define MK┆
0x7c0…7e0 50 49 44 28 70 75 2c 20 6c 70 69 64 29 20 28 28 75 5f 73 68 6f 72 74 29 28 70 75 29 20 3c 3c 20 ┆PID(pu, lpid) ((u_short)(pu) << ┆
0x7e0…800 31 36 20 7c 20 28 75 5f 73 68 6f 72 74 29 28 6c 70 69 64 29 29 0a 0a 20 20 20 20 20 20 20 20 20 ┆16 | (u_short)(lpid)) ┆
0x800…820 20 23 64 65 66 69 6e 65 20 50 47 52 50 54 4f 50 55 28 70 67 72 70 29 20 20 20 20 20 20 20 20 20 ┆ #define PGRPTOPU(pgrp) ┆
0x820…840 20 28 28 28 73 74 72 75 63 74 20 70 72 6f 63 69 64 20 2a 29 26 28 70 67 72 70 29 29 2d 3e 70 5f ┆ (((struct procid *)&(pgrp))->p_┆
0x840…860 6d 79 5f 70 75 69 64 29 0a 20 20 20 20 20 20 20 20 20 20 23 64 65 66 69 6e 65 20 4d 4b 50 47 52 ┆my_puid) #define MKPGR┆
0x860…880 50 28 70 75 2c 20 6c 70 72 67 70 29 20 20 20 20 20 20 20 28 28 75 5f 73 68 6f 72 74 29 28 70 75 ┆P(pu, lprgp) ((u_short)(pu┆
0x880…8a0 29 20 3c 3c 20 31 36 20 7c 20 28 75 5f 73 68 6f 72 74 29 28 6c 70 72 67 70 29 29 0a 20 20 20 20 ┆) << 16 | (u_short)(lprgp)) ┆
0x8a0…8c0 20 20 20 20 20 20 23 65 6e 64 69 66 20 20 5f 50 49 44 5f 0a 0a 0a 53 08 53 08 53 08 53 45 08 45 ┆ #endif _PID_ S S S SE E┆
0x8c0…8e0 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 4c 53 08 53 08 53 08 ┆ E EE E E E A A A AL L L LS S S ┆
0x8e0…900 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 73 20 28 32 29 3a 20 ┆SO O O O System Calls (2): ┆
0x900…920 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 4c 69 62 72 61 72 79 ┆ gethostid, getpuid Library┆
0x920…940 20 46 75 6e 63 74 69 6f 6e 73 20 28 33 29 3a 20 20 6d 6b 74 65 6d 70 0a 0a 4d 61 72 63 68 20 31 ┆ Functions (3): mktemp March 1┆
0x940…960 39 38 39 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 ┆989 ┆
0x960…97e 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 ┆ TX Programmer's Reference ┆