/ Garbo
/ Garbo.cdr / mac / progrmng / thinkc32.sit / unixsignal.c.bin ![]() | < prev |
MacBinary | 1989-09-14 | 2.9 KB | [TEXT/KAHL] |
Confidence | Program | Detection | Match Type | Support |
---|---|---|---|---|
66% | dexvert | AMOS Picture Packer (image/amosPicturePacker) | ext | Supported |
1% | dexvert | Debian floppy split (archive/debianFloppySplit) | ext | Unsupported |
1% | dexvert | Sound Images sound sample (audio/soundImagesSoundSample) | ext | Unsupported |
1% | dexvert | DESI-III drawing (image/desiIIIDrawing) | ext | Unsupported |
1% | dexvert | MS-DOS PMODE extender executable (executable/msdosPMODEExtenderExecutable) | ext | Unsupported |
1% | dexvert | Alien Trilogytextures (other/alienTrilogyTextures) | ext | Unsupported |
1% | dexvert | APT cache data (other/aptCacheData) | ext | Unsupported |
1% | dexvert | CorelTRACE configuration (other/corelTRACEConfiguration) | ext | Unsupported |
1% | dexvert | Dreamcast Disc (other/dreamcastDisc) | ext | Unsupported |
1% | dexvert | EST flat binary (other/estFlatBinary) | ext | Unsupported |
1% | dexvert | Finale Enigma Binary Format (other/finaleEnigmaBinaryFormat) | ext | Unsupported |
1% | dexvert | Sega Genesis/Megadrive/32x ROM (other/genesisROM) | ext | Unsupported |
1% | dexvert | Myth: The Fallen Lords game archive (other/mythTheFallenLordsGameArchive) | ext | Unsupported |
1% | dexvert | Sound Images Sound Driver (other/soundImagesSoundDriver) | ext | Unsupported |
1% | dexvert | Symantec/Norton Config (other/symantecNortonConfig) | ext | Unsupported |
1% | dexvert | Vectrex ROM (other/vectrexROM) | ext | Unsupported |
1% | dexvert | BIS raP encoded format (other/bisraPEncoded) | ext | Unsupported |
1% | dexvert | Pascal Script binary (other/pascalScriptBinary) | ext | Unsupported |
1% | dexvert | 7th Level game data archive (other/seventhLevelGameDataArchive) | ext | Unsupported |
1% | dexvert | MacBinary (archive/macBinary) | fallback | Supported |
1% | dexvert | Text File (text/txt) | fallback | Supported |
100% | file | MacBinary, Tue Jun 24 15:53:24 1986, modified Sun Jan 15 05:37:49 1989, creator Think C, type ASCII, 2729 bytes "unixsignal.c" | default (weak) | |
99% | file | data | default | |
74% | TrID | Macintosh plain text (MacBinary) | default | |
25% | TrID | MacBinary 1 | default (weak) | |
100% | lsar | MacBinary | default | |
100% | gt2 | MAC Bilddatei | default (weak) |
id metadata | |
---|---|
key | value |
macFileType | [TEXT] |
macFileCreator | [KAHL] |
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 75 6e 69 78 73 69 | 67 6e 61 6c 2e 63 00 00 |..unixsi|gnal.c..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 0a a9 00 | 00 00 00 9b 24 ab 34 9f |........|....$.4.|
|00000060| f6 24 fd 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.$......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000080| 2f 2a 09 28 43 29 20 43 | 6f 70 79 72 69 67 68 74 |/*.(C) C|opyright|
|00000090| 20 31 39 38 36 2e 20 54 | 48 49 4e 4b 20 54 65 63 | 1986. T|HINK Tec|
|000000a0| 68 6e 6f 6c 6f 67 69 65 | 73 2c 20 49 6e 63 2e 20 |hnologie|s, Inc. |
|000000b0| 20 41 6c 6c 20 72 69 67 | 68 74 73 20 72 65 73 65 | All rig|hts rese|
|000000c0| 72 76 65 64 2e 20 2a 2f | 09 0d 0d 2f 2a 20 54 68 |rved. */|.../* Th|
|000000d0| 69 73 20 6d 6f 64 75 6c | 65 20 69 6d 70 6c 65 6d |is modul|e implem|
|000000e0| 65 6e 74 73 20 61 6e 20 | 61 62 62 72 65 76 69 61 |ents an |abbrevia|
|000000f0| 74 65 64 20 76 65 72 73 | 69 6f 6e 20 6f 66 20 73 |ted vers|ion of s|
|00000100| 69 67 6e 61 6c 28 29 20 | 61 6e 64 20 69 74 73 0d |ignal() |and its.|
|00000110| 09 72 65 6c 61 74 65 64 | 20 66 75 6e 63 74 69 6f |.related| functio|
|00000120| 6e 73 20 2a 2f 0d 0d 23 | 69 66 6e 64 65 66 09 5f |ns */..#|ifndef._|
|00000130| 75 6e 69 78 68 5f 0d 23 | 69 6e 63 6c 75 64 65 20 |unixh_.#|include |
|00000140| 22 75 6e 69 78 2e 68 22 | 0d 23 65 6e 64 69 66 0d |"unix.h"|.#endif.|
|00000150| 0d 65 78 74 65 72 6e 20 | 69 6e 74 20 65 72 72 6e |.extern |int errn|
|00000160| 6f 3b 0d 65 78 74 65 72 | 6e 20 69 6e 74 20 28 2a |o;.exter|n int (*|
|00000170| 5f 6b 65 79 5f 69 6e 74 | 5f 73 69 67 5f 66 75 6e |_key_int|_sig_fun|
|00000180| 63 5f 29 28 29 3b 0d 65 | 78 74 65 72 6e 20 76 6f |c_)();.e|xtern vo|
|00000190| 69 64 20 61 62 6f 72 74 | 28 29 3b 0d 0d 73 74 61 |id abort|();..sta|
|000001a0| 74 69 63 20 76 6f 69 64 | 20 2a 73 69 67 70 74 72 |tic void| *sigptr|
|000001b0| 5b 5f 53 49 47 4d 41 58 | 2b 31 5d 3b 20 2f 2a 20 |[_SIGMAX|+1]; /* |
|000001c0| 61 72 72 61 79 20 6f 66 | 20 73 69 67 6e 61 6c 20 |array of| signal |
|000001d0| 70 6f 69 6e 74 65 72 73 | 2c 20 69 6e 69 74 69 61 |pointers|, initia|
|000001e0| 6c 6c 79 20 30 20 2a 2f | 0d 73 74 61 74 69 63 20 |lly 0 */|.static |
|000001f0| 63 68 61 72 20 5f 69 6e | 69 74 73 69 67 74 65 72 |char _in|itsigter|
|00000200| 6d 20 3d 20 30 3b 09 2f | 2a 20 66 6c 61 67 20 66 |m = 0;./|* flag f|
|00000210| 6f 72 20 73 70 65 63 69 | 61 6c 20 53 49 47 54 45 |or speci|al SIGTE|
|00000220| 52 4d 20 73 65 74 20 75 | 70 20 2a 2f 0d 0d 23 6c |RM set u|p */..#l|
|00000230| 69 6e 65 20 30 20 64 6f | 73 69 67 74 65 72 6d 0d |ine 0 do|sigterm.|
|00000240| 0d 73 74 61 74 69 63 20 | 76 6f 69 64 20 64 6f 73 |.static |void dos|
|00000250| 69 67 74 65 72 6d 28 29 | 0d 7b 72 65 67 69 73 74 |igterm()|.{regist|
|00000260| 65 72 20 76 6f 69 64 20 | 28 2a 63 61 6c 6c 65 64 |er void |(*called|
|00000270| 66 75 6e 63 29 28 29 20 | 3d 20 73 69 67 70 74 72 |func)() |= sigptr|
|00000280| 5b 53 49 47 54 45 52 4d | 5d 3b 0d 0d 09 2f 2a 20 |[SIGTERM|];.../* |
|00000290| 69 66 20 6e 6f 6e 2d 7a | 65 72 6f 2c 20 63 61 6c |if non-z|ero, cal|
|000002a0| 6c 20 74 68 69 73 20 70 | 72 6f 63 65 64 75 72 65 |l this p|rocedure|
|000002b0| 20 6f 6e 20 65 78 69 74 | 20 66 72 6f 6d 20 61 70 | on exit| from ap|
|000002c0| 70 6c 69 63 61 74 69 6f | 6e 20 2a 2f 0d 09 0d 09 |plicatio|n */....|
|000002d0| 69 66 20 28 63 61 6c 6c | 65 64 66 75 6e 63 29 0d |if (call|edfunc).|
|000002e0| 09 09 28 2a 63 61 6c 6c | 65 64 66 75 6e 63 29 28 |..(*call|edfunc)(|
|000002f0| 53 49 47 54 45 52 4d 29 | 3b 0d 7d 0d 0d 0d 23 6c |SIGTERM)|;.}...#l|
|00000300| 69 6e 65 20 30 20 73 69 | 67 6e 61 6c 0d 0d 69 6e |ine 0 si|gnal..in|
|00000310| 74 20 28 2a 73 69 67 6e | 61 6c 28 73 69 67 2c 20 |t (*sign|al(sig, |
|00000320| 66 75 6e 63 29 29 28 29 | 0d 69 6e 74 20 73 69 67 |func))()|.int sig|
|00000330| 3b 0d 69 6e 74 20 28 2a | 66 75 6e 63 29 28 29 3b |;.int (*|func)();|
|00000340| 0d 7b 0d 69 6e 74 20 28 | 2a 5f 6c 61 73 74 5f 73 |.{.int (|*_last_s|
|00000350| 69 67 5f 66 75 6e 63 5f | 29 28 29 3b 0d 0d 09 2f |ig_func_|)();.../|
|00000360| 2a 20 20 53 49 47 49 4e | 54 20 69 73 20 70 72 65 |* SIGIN|T is pre|
|00000370| 73 65 6e 74 6c 79 20 73 | 75 70 70 6f 72 74 65 64 |sently s|upported|
|00000380| 20 61 73 20 61 20 73 70 | 65 63 69 61 6c 20 63 61 | as a sp|ecial ca|
|00000390| 73 65 20 66 6f 72 20 74 | 72 61 70 70 69 6e 67 20 |se for t|rapping |
|000003a0| 5e 63 0d 09 09 61 6e 64 | 20 5e 2e 20 28 77 68 65 |^c...and| ^. (whe|
|000003b0| 72 65 20 5e 20 6d 65 61 | 6e 73 20 74 68 65 20 63 |re ^ mea|ns the c|
|000003c0| 6f 6d 6d 61 6e 64 20 28 | 66 61 6e 29 20 6b 65 79 |ommand (|fan) key|
|000003d0| 2e 20 20 5e 63 20 61 6e | 64 20 5e 2e 20 61 72 65 |. ^c an|d ^. are|
|000003e0| 0d 09 09 74 68 65 72 65 | 66 6f 72 65 20 69 6e 76 |...there|fore inv|
|000003f0| 69 73 69 62 6c 65 20 74 | 6f 20 74 68 65 20 61 70 |isible t|o the ap|
|00000400| 70 6c 69 63 61 74 69 6f | 6e 20 61 6e 64 20 61 72 |plicatio|n and ar|
|00000410| 65 20 73 77 61 6c 6c 6f | 77 65 64 20 77 68 65 6e |e swallo|wed when|
|00000420| 20 74 68 65 0d 09 09 69 | 6e 74 65 72 72 75 70 74 | the...i|nterrupt|
|00000430| 20 70 72 6f 63 65 64 75 | 72 65 20 69 73 20 63 61 | procedu|re is ca|
|00000440| 6c 6c 65 64 2e 20 20 54 | 68 69 73 20 77 61 73 20 |lled. T|his was |
|00000450| 64 6f 6e 65 20 73 6f 20 | 6c 6f 74 73 20 6f 66 20 |done so |lots of |
|00000460| 75 6e 69 78 0d 09 09 63 | 6f 64 65 20 77 6f 75 6c |unix...c|ode woul|
|00000470| 64 20 6e 6f 74 20 67 65 | 74 20 64 72 61 67 67 65 |d not ge|t dragge|
|00000480| 64 20 69 6e 20 66 6f 72 | 20 74 68 6f 73 65 20 6a |d in for| those j|
|00000490| 75 73 74 20 75 73 69 6e | 67 20 73 74 64 69 6f 2e |ust usin|g stdio.|
|000004a0| 20 2a 2f 0d 0d 09 73 77 | 69 74 63 68 20 28 73 69 | */...sw|itch (si|
|000004b0| 67 29 0d 09 7b 0d 09 63 | 61 73 65 20 53 49 47 49 |g)..{..c|ase SIGI|
|000004c0| 4e 54 3a 0d 09 0d 09 09 | 09 09 5f 6c 61 73 74 5f |NT:.....|.._last_|
|000004d0| 73 69 67 5f 66 75 6e 63 | 5f 3d 20 5f 6b 65 79 5f |sig_func|_= _key_|
|000004e0| 69 6e 74 5f 73 69 67 5f | 66 75 6e 63 5f 3b 0d 0d |int_sig_|func_;..|
|000004f0| 09 09 09 09 2f 2a 20 73 | 65 65 20 69 66 20 75 73 |..../* s|ee if us|
|00000500| 65 72 20 77 61 6e 74 73 | 20 74 6f 20 63 61 75 73 |er wants| to caus|
|00000510| 65 20 61 6e 20 65 78 69 | 74 20 6f 6e 20 53 49 47 |e an exi|t on SIG|
|00000520| 49 4e 54 20 2a 2f 0d 0d | 09 09 09 09 69 66 20 28 |INT */..|....if (|
|00000530| 28 6c 6f 6e 67 29 66 75 | 6e 63 20 3d 3d 20 53 49 |(long)fu|nc == SI|
|00000540| 47 5f 44 46 4c 29 0d 09 | 09 09 09 09 5f 6b 65 79 |G_DFL)..|...._key|
|00000550| 5f 69 6e 74 5f 73 69 67 | 5f 66 75 6e 63 5f 20 3d |_int_sig|_func_ =|
|00000560| 20 28 76 6f 69 64 2a 29 | 20 61 62 6f 72 74 3b 0d | (void*)| abort;.|
|00000570| 09 09 09 09 65 6c 73 65 | 0d 09 09 09 09 09 69 66 |....else|......if|
|00000580| 20 28 28 6c 6f 6e 67 29 | 66 75 6e 63 20 3d 3d 20 | ((long)|func == |
|00000590| 53 49 47 5f 49 47 4e 29 | 0d 09 09 09 09 09 09 5f |SIG_IGN)|......._|
|000005a0| 6b 65 79 5f 69 6e 74 5f | 73 69 67 5f 66 75 6e 63 |key_int_|sig_func|
|000005b0| 5f 20 3d 20 30 3b 20 2f | 2a 20 65 6c 69 6d 69 6e |_ = 0; /|* elimin|
|000005c0| 61 74 65 20 61 6e 79 20 | 73 65 74 20 66 75 6e 63 |ate any |set func|
|000005d0| 74 69 6f 6e 20 2a 2f 0d | 09 09 09 09 09 65 6c 73 |tion */.|.....els|
|000005e0| 65 0d 09 09 09 09 09 09 | 5f 6b 65 79 5f 69 6e 74 |e.......|_key_int|
|000005f0| 5f 73 69 67 5f 66 75 6e | 63 5f 20 3d 20 66 75 6e |_sig_fun|c_ = fun|
|00000600| 63 3b 20 2f 2a 20 73 65 | 74 20 75 70 20 22 63 61 |c; /* se|t up "ca|
|00000610| 74 63 68 22 20 66 75 6e | 63 74 69 6f 6e 20 2a 2f |tch" fun|ction */|
|00000620| 0d 09 09 09 09 0d 09 09 | 09 09 72 65 74 75 72 6e |........|..return|
|00000630| 20 28 5f 6c 61 73 74 5f | 73 69 67 5f 66 75 6e 63 | (_last_|sig_func|
|00000640| 5f 29 3b 20 2f 2a 20 72 | 65 74 75 72 6e 20 6c 61 |_); /* r|eturn la|
|00000650| 73 74 20 63 61 74 63 68 | 20 66 75 6e 63 74 69 6f |st catch| functio|
|00000660| 6e 20 2a 2f 09 0d 0d 09 | 63 61 73 65 20 53 49 47 |n */....|case SIG|
|00000670| 54 45 52 4d 3a 0d 09 0d | 09 09 09 09 2f 2a 20 65 |TERM:...|..../* e|
|00000680| 6e 61 62 6c 65 20 73 65 | 6e 64 69 6e 67 20 61 20 |nable se|nding a |
|00000690| 6c 61 73 74 20 73 69 67 | 6e 61 6c 20 6f 6e 20 61 |last sig|nal on a|
|000006a0| 70 70 6c 69 63 61 74 69 | 6f 6e 20 74 65 72 6d 69 |pplicati|on termi|
|000006b0| 6e 61 74 69 6f 6e 20 2a | 2f 0d 09 09 09 09 0d 09 |nation *|/.......|
|000006c0| 09 09 09 69 66 20 28 21 | 5f 69 6e 69 74 73 69 67 |...if (!|_initsig|
|000006d0| 74 65 72 6d 29 0d 09 09 | 09 09 7b 0d 09 09 09 09 |term)...|..{.....|
|000006e0| 09 5f 69 6e 69 74 73 69 | 67 74 65 72 6d 20 3d 20 |._initsi|gterm = |
|000006f0| 31 3b 0d 09 09 09 09 09 | 5f 6f 6e 65 78 69 74 28 |1;......|_onexit(|
|00000700| 64 6f 73 69 67 74 65 72 | 6d 29 3b 0d 09 09 09 09 |dosigter|m);.....|
|00000710| 7d 0d 09 64 65 66 61 75 | 6c 74 3a 0d 09 09 09 09 |}..defau|lt:.....|
|00000720| 69 66 20 28 28 73 69 67 | 20 3e 20 30 29 20 26 26 |if ((sig| > 0) &&|
|00000730| 20 28 73 69 67 20 3c 3d | 20 5f 53 49 47 4d 41 58 | (sig <=| _SIGMAX|
|00000740| 29 29 0d 09 09 09 09 7b | 0d 09 09 09 09 09 5f 6c |)).....{|......_l|
|00000750| 61 73 74 5f 73 69 67 5f | 66 75 6e 63 5f 20 3d 20 |ast_sig_|func_ = |
|00000760| 73 69 67 70 74 72 5b 73 | 69 67 5d 3b 0d 0d 09 09 |sigptr[s|ig];....|
|00000770| 09 09 09 2f 2a 20 73 65 | 65 20 69 66 20 75 73 65 |.../* se|e if use|
|00000780| 72 20 77 61 6e 74 73 20 | 74 6f 20 63 61 75 73 65 |r wants |to cause|
|00000790| 20 61 6e 20 65 78 69 74 | 20 6f 6e 20 73 69 67 6e | an exit| on sign|
|000007a0| 61 6c 20 2a 2f 0d 09 0d | 09 09 09 09 09 69 66 20 |al */...|.....if |
|000007b0| 28 28 6c 6f 6e 67 29 66 | 75 6e 63 20 3d 3d 20 53 |((long)f|unc == S|
|000007c0| 49 47 5f 44 46 4c 29 0d | 09 09 09 09 09 09 73 69 |IG_DFL).|......si|
|000007d0| 67 70 74 72 5b 73 69 67 | 5d 20 3d 20 28 76 6f 69 |gptr[sig|] = (voi|
|000007e0| 64 2a 29 20 61 62 6f 72 | 74 3b 0d 09 09 09 09 09 |d*) abor|t;......|
|000007f0| 65 6c 73 65 0d 09 09 09 | 09 09 09 69 66 20 28 28 |else....|...if ((|
|00000800| 6c 6f 6e 67 29 66 75 6e | 63 20 3d 3d 20 53 49 47 |long)fun|c == SIG|
|00000810| 5f 49 47 4e 29 0d 09 09 | 09 09 09 09 09 73 69 67 |_IGN)...|.....sig|
|00000820| 70 74 72 5b 73 69 67 5d | 20 3d 20 30 3b 20 2f 2a |ptr[sig]| = 0; /*|
|00000830| 20 65 6c 69 6d 69 6e 61 | 74 65 20 61 6e 79 20 73 | elimina|te any s|
|00000840| 65 74 20 66 75 6e 63 74 | 69 6f 6e 20 2a 2f 0d 09 |et funct|ion */..|
|00000850| 09 09 09 09 09 65 6c 73 | 65 0d 09 09 09 09 09 09 |.....els|e.......|
|00000860| 09 73 69 67 70 74 72 5b | 73 69 67 5d 20 3d 20 66 |.sigptr[|sig] = f|
|00000870| 75 6e 63 3b 20 2f 2a 20 | 73 65 74 20 75 70 20 22 |unc; /* |set up "|
|00000880| 63 61 74 63 68 22 20 66 | 75 6e 63 74 69 6f 6e 20 |catch" f|unction |
|00000890| 2a 2f 0d 09 09 09 09 09 | 0d 09 09 09 09 09 72 65 |*/......|......re|
|000008a0| 74 75 72 6e 20 28 5f 6c | 61 73 74 5f 73 69 67 5f |turn (_l|ast_sig_|
|000008b0| 66 75 6e 63 5f 29 3b 20 | 2f 2a 20 72 65 74 75 72 |func_); |/* retur|
|000008c0| 6e 20 6c 61 73 74 20 63 | 61 74 63 68 20 66 75 6e |n last c|atch fun|
|000008d0| 63 74 69 6f 6e 20 2a 2f | 09 0d 09 09 09 09 7d 0d |ction */|......}.|
|000008e0| 09 09 09 09 0d 09 09 09 | 09 69 66 20 28 73 69 67 |........|.if (sig|
|000008f0| 20 3d 3d 20 30 29 20 72 | 65 74 75 72 6e 20 28 30 | == 0) r|eturn (0|
|00000900| 29 3b 0d 09 09 09 09 0d | 09 09 09 09 2f 2a 20 73 |);......|..../* s|
|00000910| 69 67 6e 61 6c 20 76 61 | 6c 75 65 20 6f 75 74 20 |ignal va|lue out |
|00000920| 6f 66 20 72 61 6e 67 65 | 20 2a 2f 0d 09 09 09 09 |of range| */.....|
|00000930| 0d 09 09 09 09 65 72 72 | 6e 6f 20 3d 20 45 49 4e |.....err|no = EIN|
|00000940| 56 41 4c 3b 0d 09 09 09 | 09 72 65 74 75 72 6e 20 |VAL;....|.return |
|00000950| 28 28 76 6f 69 64 2a 29 | 2d 31 29 3b 0d 09 7d 0d |((void*)|-1);..}.|
|00000960| 7d 0d 0d 23 6c 69 6e 65 | 20 30 20 6b 69 6c 6c 0d |}..#line| 0 kill.|
|00000970| 0d 6b 69 6c 6c 28 70 69 | 64 2c 20 73 69 67 29 0d |.kill(pi|d, sig).|
|00000980| 69 6e 74 20 70 69 64 2c | 20 73 69 67 3b 0d 7b 0d |int pid,| sig;.{.|
|00000990| 09 69 66 20 28 28 73 69 | 67 20 3e 20 5f 53 49 47 |.if ((si|g > _SIG|
|000009a0| 4d 41 58 29 20 7c 7c 20 | 28 73 69 67 20 3c 20 30 |MAX) || |(sig < 0|
|000009b0| 29 29 0d 09 7b 0d 09 09 | 2f 2a 20 73 69 67 6e 61 |))..{...|/* signa|
|000009c0| 6c 20 76 61 6c 75 65 20 | 6f 75 74 20 6f 66 20 72 |l value |out of r|
|000009d0| 61 6e 67 65 20 2a 2f 0d | 09 09 65 72 72 6e 6f 20 |ange */.|..errno |
|000009e0| 3d 20 45 49 4e 56 41 4c | 3b 0d 09 09 72 65 74 75 |= EINVAL|;...retu|
|000009f0| 72 6e 20 28 2d 31 29 3b | 0d 09 7d 0d 0d 09 69 66 |rn (-1);|..}...if|
|00000a00| 20 28 28 70 69 64 20 3d | 3d 20 67 65 74 70 69 64 | ((pid =|= getpid|
|00000a10| 28 29 29 20 7c 7c 20 28 | 70 69 64 20 3c 3d 20 30 |()) || (|pid <= 0|
|00000a20| 29 29 0d 09 7b 72 65 67 | 69 73 74 65 72 20 76 6f |))..{reg|ister vo|
|00000a30| 69 64 20 28 2a 63 61 6c | 6c 65 64 66 75 6e 63 29 |id (*cal|ledfunc)|
|00000a40| 28 29 20 3d 20 73 69 67 | 70 74 72 5b 73 69 67 5d |() = sig|ptr[sig]|
|00000a50| 3b 0d 0d 09 09 69 66 20 | 28 73 69 67 29 0d 09 09 |;....if |(sig)...|
|00000a60| 7b 0d 09 09 09 2f 2a 20 | 73 65 6e 64 20 61 20 73 |{..../* |send a s|
|00000a70| 69 67 6e 61 6c 20 74 6f | 20 6f 75 72 73 65 6c 66 |ignal to| ourself|
|00000a80| 21 20 2a 2f 0d 09 0d 09 | 09 09 73 69 67 70 74 72 |! */....|..sigptr|
|00000a90| 5b 73 69 67 5d 20 3d 20 | 28 76 6f 69 64 2a 29 20 |[sig] = |(void*) |
|00000aa0| 53 49 47 5f 44 46 4c 3b | 0d 09 09 09 0d 09 09 09 |SIG_DFL;|........|
|00000ab0| 69 66 20 28 63 61 6c 6c | 65 64 66 75 6e 63 29 0d |if (call|edfunc).|
|00000ac0| 09 09 09 09 28 2a 63 61 | 6c 6c 65 64 66 75 6e 63 |....(*ca|lledfunc|
|00000ad0| 29 28 73 69 67 29 3b 0d | 09 09 7d 0d 09 09 0d 09 |)(sig);.|..}.....|
|00000ae0| 09 72 65 74 75 72 6e 20 | 28 30 29 3b 0d 09 7d 0d |.return |(0);..}.|
|00000af0| 0d 09 65 72 72 6e 6f 20 | 3d 20 45 53 52 43 48 3b |..errno |= ESRCH;|
|00000b00| 09 2f 2a 20 6e 6f 20 73 | 75 63 68 20 70 72 6f 63 |./* no s|uch proc|
|00000b10| 65 73 73 20 2a 2f 0d 09 | 72 65 74 75 72 6e 20 28 |ess */..|return (|
|00000b20| 2d 31 29 3b 0d 7d 0d 09 | 0d 00 00 00 00 00 00 00 |-1);.}..|........|
|00000b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+