home *** CD-ROM | disk | FTP | other *** search
/ ARM Club 3 / TheARMClub_PDCD3.iso / hensa / programming / python / pytex / pytexdoc / lib1 / signal / tex / node1_ct.html < prev    next >
LaTeX Document  |  1996-11-08  |  5.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 73 69 | 67 6e 61 6c 3c 2f 54 49 |odule si|gnal</TI|
|000000c0| 54 4c 45 3e 0a 0a 3c 4d | 45 54 41 20 48 54 54 50 |TLE>..<M|ETA HTTP|
|000000d0| 2d 45 51 55 49 56 3d 22 | 43 6f 6e 74 65 6e 74 2d |-EQUIV="|Content-|
|000000e0| 54 79 70 65 22 20 43 4f | 4e 54 45 4e 54 3d 22 74 |Type" CO|NTENT="t|
|000000f0| 65 78 74 2f 68 74 6d 6c | 3b 20 63 68 61 72 73 65 |ext/html|; charse|
|00000100| 74 3d 75 74 66 2d 38 22 | 3e 0a 3c 4d 45 54 41 20 |t=utf-8"|>.<META |
|00000110| 4e 41 4d 45 3d 22 76 69 | 65 77 70 6f 72 74 22 20 |NAME="vi|ewport" |
|00000120| 43 4f 4e 54 45 4e 54 3d | 22 77 69 64 74 68 3d 64 |CONTENT=|"width=d|
|00000130| 65 76 69 63 65 2d 77 69 | 64 74 68 2c 20 69 6e 69 |evice-wi|dth, ini|
|00000140| 74 69 61 6c 2d 73 63 61 | 6c 65 3d 31 2e 30 22 3e |tial-sca|le=1.0">|
|00000150| 0a 3c 4d 45 54 41 20 4e | 41 4d 45 3d 22 47 65 6e |.<META N|AME="Gen|
|00000160| 65 72 61 74 6f 72 22 20 | 43 4f 4e 54 45 4e 54 3d |erator" |CONTENT=|
|00000170| 22 4c 61 54 65 58 32 48 | 54 4d 4c 20 76 32 30 32 |"LaTeX2H|TML v202|
|00000180| 32 22 3e 0a 0a 3c 4c 49 | 4e 4b 20 52 45 4c 3d 22 |2">..<LI|NK REL="|
|00000190| 53 54 59 4c 45 53 48 45 | 45 54 22 20 48 52 45 46 |STYLESHE|ET" HREF|
|000001a0| 3d 22 74 65 78 2e 63 73 | 73 22 3e 0a 0a 3c 4c 49 |="tex.cs|s">..<LI|
|000001b0| 4e 4b 20 52 45 4c 3d 22 | 70 72 65 76 69 6f 75 73 |NK REL="|previous|
|000001c0| 22 20 48 52 45 46 3d 22 | 74 65 78 5f 6d 6e 2e 68 |" HREF="|tex_mn.h|
|000001d0| 74 6d 6c 22 3e 0a 3c 4c | 49 4e 4b 20 52 45 4c 3d |tml">.<L|INK REL=|
|000001e0| 22 75 70 22 20 48 52 45 | 46 3d 22 74 65 78 5f 6d |"up" HRE|F="tex_m|
|000001f0| 6e 2e 68 74 6d 6c 22 3e | 0a 3c 2f 48 45 41 44 3e |n.html">|.</HEAD>|
|00000200| 0a 20 0a 3c 42 4f 44 59 | 20 62 67 63 6f 6c 6f 72 |. .<BODY| bgcolor|
|00000210| 3d 22 23 66 66 66 66 66 | 66 22 20 74 65 78 74 3d |="#fffff|f" text=|
|00000220| 22 23 30 30 30 30 30 30 | 22 20 6c 69 6e 6b 3d 22 |"#000000|" link="|
|00000230| 23 39 39 34 34 45 45 22 | 20 76 6c 69 6e 6b 3d 22 |#9944EE"| vlink="|
|00000240| 23 30 30 30 30 66 66 22 | 20 61 6c 69 6e 6b 3d 22 |#0000ff"| alink="|
|00000250| 23 30 30 66 66 30 30 22 | 3e 0a 0a 3c 48 31 3e 3c |#00ff00"|>..<H1><|
|00000260| 41 20 49 44 3d 22 53 45 | 43 54 49 4f 4e 30 30 30 |A ID="SE|CTION000|
|00000270| 31 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |10000000|00000000|
|00000280| 30 22 3e 0a 42 75 69 6c | 74 2d 69 6e 20 4d 6f 64 |0">.Buil|t-in Mod|
|00000290| 75 6c 65 20 73 69 67 6e | 61 6c 3c 2f 41 3e 0a 3c |ule sign|al</A>.<|
|000002a0| 2f 48 31 3e 0a 0a 3c 50 | 3e 0a 73 69 67 6e 61 6c |/H1>..<P|>.signal|
|000002b0| 0a 54 68 69 73 20 6d 6f | 64 75 6c 65 20 70 72 6f |.This mo|dule pro|
|000002c0| 76 69 64 65 73 20 6d 65 | 63 68 61 6e 69 73 6d 73 |vides me|chanisms|
|000002d0| 20 74 6f 20 75 73 65 20 | 73 69 67 6e 61 6c 20 68 | to use |signal h|
|000002e0| 61 6e 64 6c 65 72 73 20 | 69 6e 20 50 79 74 68 6f |andlers |in Pytho|
|000002f0| 6e 2e 0a 53 6f 6d 65 20 | 67 65 6e 65 72 61 6c 20 |n..Some |general |
|00000300| 72 75 6c 65 73 20 66 6f | 72 20 77 6f 72 6b 69 6e |rules fo|r workin|
|00000310| 67 20 77 69 74 68 20 73 | 69 67 6e 61 6c 73 20 68 |g with s|ignals h|
|00000320| 61 6e 64 6c 65 72 73 3a | 0a 0a 3c 50 3e 0a 0a 3c |andlers:|..<P>..<|
|00000330| 55 4c 3e 0a 3c 4c 49 3e | 41 20 68 61 6e 64 6c 65 |UL>.<LI>|A handle|
|00000340| 72 20 66 6f 72 20 61 20 | 70 61 72 74 69 63 75 6c |r for a |particul|
|00000350| 61 72 20 73 69 67 6e 61 | 6c 2c 20 6f 6e 63 65 20 |ar signa|l, once |
|00000360| 73 65 74 2c 20 72 65 6d | 61 69 6e 73 20 69 6e 73 |set, rem|ains ins|
|00000370| 74 61 6c 6c 65 64 20 75 | 6e 74 69 6c 0a 69 74 20 |talled u|ntil.it |
|00000380| 69 73 20 65 78 70 6c 69 | 63 69 74 6c 79 20 72 65 |is expli|citly re|
|00000390| 73 65 74 20 28 69 2e 65 | 2e 20 50 79 74 68 6f 6e |set (i.e|. Python|
|000003a0| 20 65 6d 75 6c 61 74 65 | 73 20 74 68 65 20 42 53 | emulate|s the BS|
|000003b0| 44 20 73 74 79 6c 65 20 | 69 6e 74 65 72 66 61 63 |D style |interfac|
|000003c0| 65 0a 72 65 67 61 72 64 | 6c 65 73 73 20 6f 66 20 |e.regard|less of |
|000003d0| 74 68 65 20 75 6e 64 65 | 72 6c 79 69 6e 67 20 69 |the unde|rlying i|
|000003e0| 6d 70 6c 65 6d 65 6e 74 | 61 74 69 6f 6e 29 2c 20 |mplement|ation), |
|000003f0| 77 69 74 68 20 74 68 65 | 20 65 78 63 65 70 74 69 |with the| excepti|
|00000400| 6f 6e 20 6f 66 0a 74 68 | 65 20 68 61 6e 64 6c 65 |on of.th|e handle|
|00000410| 72 20 66 6f 72 20 53 49 | 47 43 48 4c 44 2c 20 77 |r for SI|GCHLD, w|
|00000420| 68 69 63 68 20 66 6f 6c | 6c 6f 77 73 20 74 68 65 |hich fol|lows the|
|00000430| 20 75 6e 64 65 72 6c 79 | 69 6e 67 0a 69 6d 70 6c | underly|ing.impl|
|00000440| 65 6d 65 6e 74 61 74 69 | 6f 6e 2e 0a 0a 3c 50 3e |ementati|on...<P>|
|00000450| 0a 3c 2f 4c 49 3e 0a 3c | 4c 49 3e 54 68 65 72 65 |.</LI>.<|LI>There|
|00000460| 20 69 73 20 6e 6f 20 77 | 61 79 20 74 6f 20 60 60 | is no w|ay to ``|
|00000470| 62 6c 6f 63 6b 27 27 20 | 73 69 67 6e 61 6c 73 20 |block'' |signals |
|00000480| 74 65 6d 70 6f 72 61 72 | 69 6c 79 20 66 72 6f 6d |temporar|ily from|
|00000490| 20 63 72 69 74 69 63 61 | 6c 0a 73 65 63 74 69 6f | critica|l.sectio|
|000004a0| 6e 73 20 28 73 69 6e 63 | 65 20 74 68 69 73 20 69 |ns (sinc|e this i|
|000004b0| 73 20 6e 6f 74 20 73 75 | 70 70 6f 72 74 65 64 20 |s not su|pported |
|000004c0| 62 79 20 61 6c 6c 20 20 | 66 6c 61 76 6f 72 73 29 |by all |flavors)|
|000004d0| 2e 0a 0a 3c 50 3e 0a 3c | 2f 4c 49 3e 0a 3c 4c 49 |...<P>.<|/LI>.<LI|
|000004e0| 3e 41 6c 74 68 6f 75 67 | 68 20 50 79 74 68 6f 6e |>Althoug|h Python|
|000004f0| 20 73 69 67 6e 61 6c 20 | 68 61 6e 64 6c 65 72 73 | signal |handlers|
|00000500| 20 61 72 65 20 63 61 6c | 6c 65 64 20 61 73 79 6e | are cal|led asyn|
|00000510| 63 68 72 6f 6e 6f 75 73 | 6c 79 20 61 73 20 66 61 |chronous|ly as fa|
|00000520| 72 20 61 73 0a 74 68 65 | 20 50 79 74 68 6f 6e 20 |r as.the| Python |
|00000530| 75 73 65 72 20 69 73 20 | 63 6f 6e 63 65 72 6e 65 |user is |concerne|
|00000540| 64 2c 20 74 68 65 79 20 | 63 61 6e 20 6f 6e 6c 79 |d, they |can only|
|00000550| 20 6f 63 63 75 72 20 62 | 65 74 77 65 65 6e 20 74 | occur b|etween t|
|00000560| 68 65 0a 60 60 61 74 6f | 6d 69 63 27 27 20 69 6e |he.``ato|mic'' in|
|00000570| 73 74 72 75 63 74 69 6f | 6e 73 20 6f 66 20 74 68 |structio|ns of th|
|00000580| 65 20 50 79 74 68 6f 6e | 20 69 6e 74 65 72 70 72 |e Python| interpr|
|00000590| 65 74 65 72 2e 20 20 54 | 68 69 73 20 6d 65 61 6e |eter. T|his mean|
|000005a0| 73 20 74 68 61 74 0a 73 | 69 67 6e 61 6c 73 20 61 |s that.s|ignals a|
|000005b0| 72 72 69 76 69 6e 67 20 | 64 75 72 69 6e 67 20 6c |rriving |during l|
|000005c0| 6f 6e 67 20 63 61 6c 63 | 75 6c 61 74 69 6f 6e 73 |ong calc|ulations|
|000005d0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 70 75 72 | impleme|nted pur|
|000005e0| 65 6c 79 20 69 6e 20 43 | 0a 28 65 2e 67 2e 20 72 |ely in C|.(e.g. r|
|000005f0| 65 67 75 6c 61 72 20 65 | 78 70 72 65 73 73 69 6f |egular e|xpressio|
|00000600| 6e 20 6d 61 74 63 68 65 | 73 20 6f 6e 20 6c 61 72 |n matche|s on lar|
|00000610| 67 65 20 62 6f 64 69 65 | 73 20 6f 66 20 74 65 78 |ge bodie|s of tex|
|00000620| 74 29 20 6d 61 79 20 62 | 65 0a 64 65 6c 61 79 65 |t) may b|e.delaye|
|00000630| 64 20 66 6f 72 20 61 6e | 20 61 72 62 69 74 72 61 |d for an| arbitra|
|00000640| 72 79 20 61 6d 6f 75 6e | 74 20 6f 66 20 74 69 6d |ry amoun|t of tim|
|00000650| 65 2e 0a 0a 3c 50 3e 0a | 3c 2f 4c 49 3e 0a 3c 4c |e...<P>.|</LI>.<L|
|00000660| 49 3e 57 68 65 6e 20 61 | 20 73 69 67 6e 61 6c 20 |I>When a| signal |
|00000670| 61 72 72 69 76 65 73 20 | 64 75 72 69 6e 67 20 61 |arrives |during a|
|00000680| 6e 20 49 2f 4f 20 6f 70 | 65 72 61 74 69 6f 6e 2c |n I/O op|eration,|
|00000690| 20 69 74 20 69 73 20 70 | 6f 73 73 69 62 6c 65 20 | it is p|ossible |
|000006a0| 74 68 61 74 20 74 68 65 | 0a 49 2f 4f 20 6f 70 65 |that the|.I/O ope|
|000006b0| 72 61 74 69 6f 6e 20 72 | 61 69 73 65 73 20 61 6e |ration r|aises an|
|000006c0| 20 65 78 63 65 70 74 69 | 6f 6e 20 61 66 74 65 72 | excepti|on after|
|000006d0| 20 74 68 65 20 73 69 67 | 6e 61 6c 20 68 61 6e 64 | the sig|nal hand|
|000006e0| 6c 65 72 20 72 65 74 75 | 72 6e 73 2e 0a 54 68 69 |ler retu|rns..Thi|
|000006f0| 73 20 69 73 20 64 65 70 | 65 6e 64 65 6e 74 20 6f |s is dep|endent o|
|00000700| 6e 20 74 68 65 20 75 6e | 64 65 72 6c 79 69 6e 67 |n the un|derlying|
|00000710| 20 20 73 79 73 74 65 6d | 27 73 20 73 65 6d 61 6e | system|'s seman|
|00000720| 74 69 63 73 20 72 65 67 | 61 72 64 69 6e 67 0a 69 |tics reg|arding.i|
|00000730| 6e 74 65 72 72 75 70 74 | 65 64 20 73 79 73 74 65 |nterrupt|ed syste|
|00000740| 6d 20 63 61 6c 6c 73 2e | 0a 0a 3c 50 3e 0a 3c 2f |m calls.|..<P>.</|
|00000750| 4c 49 3e 0a 3c 4c 49 3e | 42 65 63 61 75 73 65 20 |LI>.<LI>|Because |
|00000760| 74 68 65 20 43 20 73 69 | 67 6e 61 6c 20 68 61 6e |the C si|gnal han|
|00000770| 64 6c 65 72 20 61 6c 77 | 61 79 73 20 72 65 74 75 |dler alw|ays retu|
|00000780| 72 6e 73 2c 20 69 74 20 | 6d 61 6b 65 73 20 6c 69 |rns, it |makes li|
|00000790| 74 74 6c 65 20 73 65 6e | 73 65 20 74 6f 0a 63 61 |ttle sen|se to.ca|
|000007a0| 74 63 68 20 73 79 6e 63 | 68 72 6f 6e 6f 75 73 20 |tch sync|hronous |
|000007b0| 65 72 72 6f 72 73 20 6c | 69 6b 65 20 53 49 47 46 |errors l|ike SIGF|
|000007c0| 50 45 20 6f 72 20 53 49 | 47 53 45 47 56 2e 0a 0a |PE or SI|GSEGV...|
|000007d0| 3c 50 3e 0a 3c 2f 4c 49 | 3e 0a 3c 4c 49 3e 50 79 |<P>.</LI|>.<LI>Py|
|000007e0| 74 68 6f 6e 20 69 6e 73 | 74 61 6c 6c 73 20 61 20 |thon ins|talls a |
|000007f0| 73 6d 61 6c 6c 20 6e 75 | 6d 62 65 72 20 6f 66 20 |small nu|mber of |
|00000800| 73 69 67 6e 61 6c 20 68 | 61 6e 64 6c 65 72 73 20 |signal h|andlers |
|00000810| 62 79 20 64 65 66 61 75 | 6c 74 3a 0a 53 49 47 50 |by defau|lt:.SIGP|
|00000820| 49 50 45 20 69 73 20 69 | 67 6e 6f 72 65 64 20 28 |IPE is i|gnored (|
|00000830| 73 6f 20 77 72 69 74 65 | 20 65 72 72 6f 72 73 20 |so write| errors |
|00000840| 6f 6e 20 70 69 70 65 73 | 20 61 6e 64 20 73 6f 63 |on pipes| and soc|
|00000850| 6b 65 74 73 20 63 61 6e | 20 62 65 0a 72 65 70 6f |kets can| be.repo|
|00000860| 72 74 65 64 20 61 73 20 | 6f 72 64 69 6e 61 72 79 |rted as |ordinary|
|00000870| 20 50 79 74 68 6f 6e 20 | 65 78 63 65 70 74 69 6f | Python |exceptio|
|00000880| 6e 73 29 2c 20 53 49 47 | 49 4e 54 20 69 73 20 74 |ns), SIG|INT is t|
|00000890| 72 61 6e 73 6c 61 74 65 | 64 0a 69 6e 74 6f 20 61 |ranslate|d.into a|
|000008a0| 20 4b 65 79 62 6f 61 72 | 64 49 6e 74 65 72 72 75 | Keyboar|dInterru|
|000008b0| 70 74 20 65 78 63 65 70 | 74 69 6f 6e 2c 20 61 6e |pt excep|tion, an|
|000008c0| 64 20 53 49 47 54 45 52 | 4d 20 69 73 0a 63 61 75 |d SIGTER|M is.cau|
|000008d0| 67 68 74 20 73 6f 20 74 | 68 61 74 20 6e 65 63 65 |ght so t|hat nece|
|000008e0| 73 73 61 72 79 20 63 6c | 65 61 6e 75 70 20 28 65 |ssary cl|eanup (e|
|000008f0| 73 70 65 63 69 61 6c 6c | 79 20 73 79 73 2e 65 78 |speciall|y sys.ex|
|00000900| 69 74 66 75 6e 63 29 20 | 63 61 6e 0a 62 65 20 70 |itfunc) |can.be p|
|00000910| 65 72 66 6f 72 6d 65 64 | 20 62 65 66 6f 72 65 20 |erformed| before |
|00000920| 61 63 74 75 61 6c 6c 79 | 20 74 65 72 6d 69 6e 61 |actually| termina|
|00000930| 74 69 6e 67 2e 20 20 41 | 6c 6c 20 6f 66 20 74 68 |ting. A|ll of th|
|00000940| 65 73 65 20 63 61 6e 20 | 62 65 0a 6f 76 65 72 72 |ese can |be.overr|
|00000950| 69 64 64 65 6e 2e 0a 0a | 3c 50 3e 0a 3c 2f 4c 49 |idden...|<P>.</LI|
|00000960| 3e 0a 3c 4c 49 3e 53 6f | 6d 65 20 63 61 72 65 20 |>.<LI>So|me care |
|00000970| 6d 75 73 74 20 62 65 20 | 74 61 6b 65 6e 20 69 66 |must be |taken if|
|00000980| 20 62 6f 74 68 20 73 69 | 67 6e 61 6c 73 20 61 6e | both si|gnals an|
|00000990| 64 20 74 68 72 65 61 64 | 73 20 61 72 65 20 75 73 |d thread|s are us|
|000009a0| 65 64 20 69 6e 20 74 68 | 65 0a 73 61 6d 65 20 70 |ed in th|e.same p|
|000009b0| 72 6f 67 72 61 6d 2e 20 | 20 54 68 65 20 66 75 6e |rogram. | The fun|
|000009c0| 64 61 6d 65 6e 74 61 6c | 20 74 68 69 6e 67 20 74 |damental| thing t|
|000009d0| 6f 20 72 65 6d 65 6d 62 | 65 72 20 69 6e 20 75 73 |o rememb|er in us|
|000009e0| 69 6e 67 20 73 69 67 6e | 61 6c 73 20 61 6e 64 0a |ing sign|als and.|
|000009f0| 74 68 72 65 61 64 73 20 | 73 69 6d 75 6c 74 61 6e |threads |simultan|
|00000a00| 65 6f 75 73 6c 79 20 69 | 73 3a 20 61 6c 77 61 79 |eously i|s: alway|
|00000a10| 73 20 70 65 72 66 6f 72 | 6d 20 73 69 67 6e 61 6c |s perfor|m signal|
|00000a20| 28 29 20 6f 70 65 72 61 | 74 69 6f 6e 73 0a 69 6e |() opera|tions.in|
|00000a30| 20 74 68 65 20 6d 61 69 | 6e 20 74 68 72 65 61 64 | the mai|n thread|
|00000a40| 20 6f 66 20 65 78 65 63 | 75 74 69 6f 6e 2e 20 20 | of exec|ution. |
|00000a50| 41 6e 79 20 74 68 72 65 | 61 64 20 63 61 6e 20 70 |Any thre|ad can p|
|00000a60| 65 72 66 6f 72 6d 20 61 | 6e 0a 61 6c 61 72 6d 28 |erform a|n.alarm(|
|00000a70| 29 2c 20 67 65 74 73 69 | 67 6e 61 6c 28 29 2c 20 |), getsi|gnal(), |
|00000a80| 6f 72 20 70 61 75 73 65 | 28 29 3b 20 6f 6e 6c 79 |or pause|(); only|
|00000a90| 20 74 68 65 20 6d 61 69 | 6e 0a 74 68 72 65 61 64 | the mai|n.thread|
|00000aa0| 20 63 61 6e 20 73 65 74 | 20 61 20 6e 65 77 20 73 | can set| a new s|
|00000ab0| 69 67 6e 61 6c 20 68 61 | 6e 64 6c 65 72 2c 20 61 |ignal ha|ndler, a|
|00000ac0| 6e 64 20 74 68 65 20 6d | 61 69 6e 20 74 68 72 65 |nd the m|ain thre|
|00000ad0| 61 64 20 77 69 6c 6c 20 | 62 65 20 74 68 65 0a 6f |ad will |be the.o|
|00000ae0| 6e 6c 79 20 6f 6e 65 20 | 74 6f 20 72 65 63 65 69 |nly one |to recei|
|00000af0| 76 65 20 73 69 67 6e 61 | 6c 73 20 28 74 68 69 73 |ve signa|ls (this|
|00000b00| 20 69 73 20 65 6e 66 6f | 72 63 65 64 20 62 79 20 | is enfo|rced by |
|00000b10| 74 68 65 20 50 79 74 68 | 6f 6e 20 73 69 67 6e 61 |the Pyth|on signa|
|00000b20| 6c 0a 6d 6f 64 75 6c 65 | 2c 20 65 76 65 6e 20 69 |l.module|, even i|
|00000b30| 66 20 74 68 65 20 75 6e | 64 65 72 6c 79 69 6e 67 |f the un|derlying|
|00000b40| 20 74 68 72 65 61 64 20 | 69 6d 70 6c 65 6d 65 6e | thread |implemen|
|00000b50| 74 61 74 69 6f 6e 20 73 | 75 70 70 6f 72 74 73 20 |tation s|upports |
|00000b60| 73 65 6e 64 69 6e 67 0a | 73 69 67 6e 61 6c 73 20 |sending.|signals |
|00000b70| 74 6f 20 69 6e 64 69 76 | 69 64 75 61 6c 20 74 68 |to indiv|idual th|
|00000b80| 72 65 61 64 73 29 2e 20 | 20 54 68 69 73 20 6d 65 |reads). | This me|
|00000b90| 61 6e 73 20 74 68 61 74 | 20 73 69 67 6e 61 6c 73 |ans that| signals|
|00000ba0| 20 63 61 6e 27 74 20 62 | 65 20 75 73 65 64 0a 61 | can't b|e used.a|
|00000bb0| 73 20 61 20 6d 65 61 6e | 73 20 6f 66 20 69 6e 74 |s a mean|s of int|
|00000bc0| 65 72 74 68 72 65 61 64 | 20 63 6f 6d 6d 75 6e 69 |erthread| communi|
|00000bd0| 63 61 74 69 6f 6e 2e 20 | 20 55 73 65 20 6c 6f 63 |cation. | Use loc|
|00000be0| 6b 73 20 69 6e 73 74 65 | 61 64 2e 0a 0a 3c 50 3e |ks inste|ad...<P>|
|00000bf0| 0a 3c 2f 4c 49 3e 0a 3c | 2f 55 4c 3e 0a 0a 3c 50 |.</LI>.<|/UL>..<P|
|00000c00| 3e 0a 54 68 65 20 76 61 | 72 69 61 62 6c 65 73 20 |>.The va|riables |
|00000c10| 64 65 66 69 6e 65 64 20 | 69 6e 20 74 68 65 20 73 |defined |in the s|
|00000c20| 69 67 6e 61 6c 20 6d 6f | 64 75 6c 65 20 61 72 65 |ignal mo|dule are|
|00000c30| 3a 0a 0a 3c 50 3e 0a 0a | 3c 42 52 3e 0a 3c 49 4d |:..<P>..|<BR>.<IM|
|00000c40| 47 0a 20 20 53 54 59 4c | 45 3d 22 68 65 69 67 68 |G. STYL|E="heigh|
|00000c50| 74 3a 20 31 39 36 2e 32 | 35 65 78 3b 20 76 65 72 |t: 196.2|5ex; ver|
|00000c60| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 2d 30 2e |tical-al|ign: -0.|
|00000c70| 35 37 65 78 3b 20 22 20 | 53 52 43 3d 22 69 6d 67 |57ex; " |SRC="img|
|00000c80| 31 2e 70 6e 67 22 0a 20 | 41 4c 54 3d 22 5c 62 65 |1.png". |ALT="\be|
|00000c90| 67 69 6e 7b 64 61 74 61 | 64 65 73 63 7d 7b 53 49 |gin{data|desc}{SI|
|00000ca0| 47 5f 44 46 4c 7d 0a 54 | 68 69 73 20 69 73 20 6f |G_DFL}.T|his is o|
|00000cb0| 6e 65 20 6f 66 20 74 77 | 6f 20 73 74 61 6e 64 61 |ne of tw|o standa|
|00000cc0| 72 64 20 73 69 67 6e 61 | 6c 20 68 61 6e 64 6c 69 |rd signa|l handli|
|00000cd0| 6e 67 20 6f 70 74 69 6f | 6e 73 3b 20 2e 2e 2e 0a |ng optio|ns; ....|
|00000ce0| 2e 2e 2e 78 69 74 2c 0a | 77 68 69 6c 65 20 74 68 |...xit,.|while th|
|00000cf0| 65 20 64 65 66 61 75 6c | 74 20 61 63 74 69 6f 6e |e defaul|t action|
|00000d00| 20 66 6f 72 20 53 49 47 | 43 4c 44 20 69 73 20 74 | for SIG|CLD is t|
|00000d10| 6f 20 73 69 6d 70 6c 79 | 20 69 67 6e 6f 72 65 20 |o simply| ignore |
|00000d20| 69 74 2e 0a 5c 65 6e 64 | 7b 64 61 74 61 64 65 73 |it..\end|{datades|
|00000d30| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|00000d40| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00000d50| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|00000d60| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00000d70| 3a 20 31 37 36 2e 36 38 | 65 78 3b 20 22 20 53 52 |: 176.68|ex; " SR|
|00000d80| 43 3d 22 69 6d 67 32 2e | 70 6e 67 22 0a 20 41 4c |C="img2.|png". AL|
|00000d90| 54 3d 22 5c 62 65 67 69 | 6e 7b 64 61 74 61 64 65 |T="\begi|n{datade|
|00000da0| 73 63 7d 7b 53 49 47 5f | 49 47 4e 7d 0a 54 68 69 |sc}{SIG_|IGN}.Thi|
|00000db0| 73 20 69 73 20 61 6e 6f | 74 68 65 72 20 73 74 61 |s is ano|ther sta|
|00000dc0| 6e 64 61 72 64 20 73 69 | 67 6e 61 6c 20 68 61 6e |ndard si|gnal han|
|00000dd0| 64 6c 65 72 2c 20 77 68 | 69 63 68 20 77 69 6c 6c |dler, wh|ich will|
|00000de0| 20 73 69 6d 70 6c 79 20 | 69 67 6e 6f 72 65 0a 74 | simply |ignore.t|
|00000df0| 68 65 20 67 69 76 65 6e | 20 73 69 67 6e 61 6c 2e |he given| signal.|
|00000e00| 0a 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 22 |.\end{da|tadesc}"|
|00000e10| 3e 0a 3c 42 52 3e 0a 0a | 3c 50 3e 0a 3c 42 52 3e |>.<BR>..|<P>.<BR>|
|00000e20| 0a 3c 49 4d 47 0a 20 20 | 53 54 59 4c 45 3d 22 68 |.<IMG. |STYLE="h|
|00000e30| 65 69 67 68 74 3a 20 32 | 2e 31 37 65 78 3b 20 76 |eight: 2|.17ex; v|
|00000e40| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 31 |ertical-|align: 1|
|00000e50| 37 36 2e 35 35 65 78 3b | 20 22 20 53 52 43 3d 22 |76.55ex;| " SRC="|
|00000e60| 69 6d 67 33 2e 70 6e 67 | 22 0a 20 41 4c 54 3d 22 |img3.png|". ALT="|
|00000e70| 5c 62 65 67 69 6e 7b 64 | 61 74 61 64 65 73 63 7d |\begin{d|atadesc}|
|00000e80| 7b 53 49 47 2a 7d 0a 41 | 6c 6c 20 74 68 65 20 73 |{SIG*}.A|ll the s|
|00000e90| 69 67 6e 61 6c 20 6e 75 | 6d 62 65 72 73 20 61 72 |ignal nu|mbers ar|
|00000ea0| 65 20 64 65 66 69 6e 65 | 64 20 73 79 6d 62 6f 6c |e define|d symbol|
|00000eb0| 69 63 61 6c 6c 79 2e 20 | 46 6f 72 20 65 78 61 2e |ically. |For exa.|
|00000ec0| 2e 2e 0a 2e 2e 2e 6c 79 | 0a 74 68 6f 73 65 20 6e |......ly|.those n|
|00000ed0| 61 6d 65 73 20 64 65 66 | 69 6e 65 64 20 62 79 20 |ames def|ined by |
|00000ee0| 74 68 65 20 73 79 73 74 | 65 6d 20 61 72 65 20 64 |the syst|em are d|
|00000ef0| 65 66 69 6e 65 64 20 62 | 79 20 74 68 69 73 20 6d |efined b|y this m|
|00000f00| 6f 64 75 6c 65 2e 0a 5c | 65 6e 64 7b 64 61 74 61 |odule..\|end{data|
|00000f10| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |desc}">.|<BR>..<P|
|00000f20| 3e 0a 3c 42 52 3e 0a 3c | 49 4d 47 0a 20 20 53 54 |>.<BR>.<|IMG. ST|
|00000f30| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 32 2e 32 |YLE="hei|ght: 2.2|
|00000f40| 34 65 78 3b 20 76 65 72 | 74 69 63 61 6c 2d 61 6c |4ex; ver|tical-al|
|00000f50| 69 67 6e 3a 20 31 37 36 | 2e 35 34 65 78 3b 20 22 |ign: 176|.54ex; "|
|00000f60| 20 53 52 43 3d 22 69 6d | 67 34 2e 70 6e 67 22 0a | SRC="im|g4.png".|
|00000f70| 20 41 4c 54 3d 22 5c 62 | 65 67 69 6e 7b 64 61 74 | ALT="\b|egin{dat|
|00000f80| 61 64 65 73 63 7d 7b 4e | 53 49 47 7d 0a 4f 6e 65 |adesc}{N|SIG}.One|
|00000f90| 20 6d 6f 72 65 20 74 68 | 61 6e 20 74 68 65 20 6e | more th|an the n|
|00000fa0| 75 6d 62 65 72 20 6f 66 | 20 74 68 65 20 68 69 67 |umber of| the hig|
|00000fb0| 68 65 73 74 20 73 69 67 | 6e 61 6c 20 6e 75 6d 62 |hest sig|nal numb|
|00000fc0| 65 72 2e 0a 5c 65 6e 64 | 7b 64 61 74 61 64 65 73 |er..\end|{datades|
|00000fd0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 54 |c}">.<BR|>..<P>.T|
|00000fe0| 68 65 20 73 69 67 6e 61 | 6c 20 6d 6f 64 75 6c 65 |he signa|l module|
|00000ff0| 20 64 65 66 69 6e 65 73 | 20 74 68 65 20 66 6f 6c | defines| the fol|
|00001000| 6c 6f 77 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 73 |lowing f|unctions|
|00001010| 3a 0a 0a 3c 50 3e 0a 3c | 42 52 3e 0a 3c 49 4d 47 |:..<P>.<|BR>.<IMG|
|00001020| 0a 20 20 53 54 59 4c 45 | 3d 22 68 65 69 67 68 74 |. STYLE|="height|
|00001030| 3a 20 32 2e 31 37 65 78 | 3b 20 76 65 72 74 69 63 |: 2.17ex|; vertic|
|00001040| 61 6c 2d 61 6c 69 67 6e | 3a 20 31 37 36 2e 35 35 |al-align|: 176.55|
|00001050| 65 78 3b 20 22 20 53 52 | 43 3d 22 69 6d 67 35 2e |ex; " SR|C="img5.|
|00001060| 70 6e 67 22 0a 20 41 4c | 54 3d 22 5c 62 65 67 69 |png". AL|T="\begi|
|00001070| 6e 7b 66 75 6e 63 64 65 | 73 63 7d 7b 61 6c 61 72 |n{funcde|sc}{alar|
|00001080| 6d 7d 7b 74 69 6d 65 7d | 0a 49 66 20 5c 76 61 72 |m}{time}|.If \var|
|00001090| 7b 74 69 6d 65 7d 20 69 | 73 20 6e 6f 6e 2d 7a 65 |{time} i|s non-ze|
|000010a0| 72 6f 2c 20 74 68 69 73 | 20 66 75 6e 63 74 69 6f |ro, this| functio|
|000010b0| 6e 20 72 65 71 75 65 73 | 74 73 2e 2e 2e 0a 2e 2e |n reques|ts......|
|000010c0| 2e 63 75 72 72 65 6e 74 | 6c 79 20 73 63 68 65 64 |.current|ly sched|
|000010d0| 75 6c 65 64 2e 20 28 53 | 65 65 20 74 68 65 20 5c |uled. (S|ee the \|
|000010e0| 55 4e 49 58 7b 7d 20 6d | 61 6e 20 70 61 67 65 0a |UNIX{} m|an page.|
|000010f0| 5c 63 6f 64 65 7b 61 6c | 61 72 6d 28 32 29 7d 2e |\code{al|arm(2)}.|
|00001100| 29 0a 5c 65 6e 64 7b 66 | 75 6e 63 64 65 73 63 7d |).\end{f|uncdesc}|
|00001110| 22 3e 0a 3c 42 52 3e 0a | 0a 3c 50 3e 0a 3c 42 52 |">.<BR>.|.<P>.<BR|
|00001120| 3e 0a 3c 49 4d 47 0a 20 | 20 53 54 59 4c 45 3d 22 |>.<IMG. | STYLE="|
|00001130| 68 65 69 67 68 74 3a 20 | 32 2e 31 37 65 78 3b 20 |height: |2.17ex; |
|00001140| 76 65 72 74 69 63 61 6c | 2d 61 6c 69 67 6e 3a 20 |vertical|-align: |
|00001150| 31 37 36 2e 35 34 65 78 | 3b 20 22 20 53 52 43 3d |176.54ex|; " SRC=|
|00001160| 22 69 6d 67 36 2e 70 6e | 67 22 0a 20 41 4c 54 3d |"img6.pn|g". ALT=|
|00001170| 22 5c 62 65 67 69 6e 7b | 66 75 6e 63 64 65 73 63 |"\begin{|funcdesc|
|00001180| 7d 7b 67 65 74 73 69 67 | 6e 61 6c 7d 7b 73 69 67 |}{getsig|nal}{sig|
|00001190| 6e 61 6c 6e 75 6d 7d 0a | 52 65 74 75 72 6e 20 74 |nalnum}.|Return t|
|000011a0| 68 65 20 63 75 72 72 65 | 6e 74 20 73 69 67 6e 61 |he curre|nt signa|
|000011b0| 6c 20 68 61 6e 64 6c 65 | 72 20 66 6f 72 20 74 68 |l handle|r for th|
|000011c0| 2e 2e 2e 0a 2e 2e 2e 0a | 74 68 61 74 20 74 68 65 |........|that the|
|000011d0| 20 70 72 65 76 69 6f 75 | 73 20 73 69 67 6e 61 6c | previou|s signal|
|000011e0| 20 68 61 6e 64 6c 65 72 | 20 77 61 73 20 6e 6f 74 | handler| was not|
|000011f0| 20 69 6e 73 74 61 6c 6c | 65 64 20 66 72 6f 6d 20 | install|ed from |
|00001200| 50 79 74 68 6f 6e 2e 0a | 5c 65 6e 64 7b 66 75 6e |Python..|\end{fun|
|00001210| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00001220| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00001230| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00001240| 31 37 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |17ex; ve|rtical-a|
|00001250| 6c 69 67 6e 3a 20 31 37 | 36 2e 35 35 65 78 3b 20 |lign: 17|6.55ex; |
|00001260| 22 20 53 52 43 3d 22 69 | 6d 67 37 2e 70 6e 67 22 |" SRC="i|mg7.png"|
|00001270| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00001280| 6e 63 64 65 73 63 7d 7b | 70 61 75 73 65 7d 7b 7d |ncdesc}{|pause}{}|
|00001290| 0a 43 61 75 73 65 20 74 | 68 65 20 70 72 6f 63 65 |.Cause t|he proce|
|000012a0| 73 73 20 74 6f 20 73 6c | 65 65 70 20 75 6e 74 69 |ss to sl|eep unti|
|000012b0| 6c 20 61 20 73 69 67 6e | 61 6c 20 69 73 20 72 65 |l a sign|al is re|
|000012c0| 63 65 69 76 65 64 2e 2e | 2e 0a 2e 2e 2e 64 2e 20 |ceived..|.....d. |
|000012d0| 52 65 74 75 72 6e 73 20 | 6e 6f 74 68 69 6e 67 2e |Returns |nothing.|
|000012e0| 20 28 53 65 65 20 74 68 | 65 0a 5c 55 4e 49 58 7b | (See th|e.\UNIX{|
|000012f0| 7d 20 6d 61 6e 20 70 61 | 67 65 20 5c 63 6f 64 65 |} man pa|ge \code|
|00001300| 7b 73 69 67 6e 61 6c 28 | 32 29 7d 2e 29 0a 5c 65 |{signal(|2)}.).\e|
|00001310| 6e 64 7b 66 75 6e 63 64 | 65 73 63 7d 22 3e 0a 3c |nd{funcd|esc}">.<|
|00001320| 42 52 3e 0a 0a 3c 50 3e | 0a 3c 42 52 3e 0a 3c 49 |BR>..<P>|.<BR>.<I|
|00001330| 4d 47 0a 20 20 53 54 59 | 4c 45 3d 22 68 65 69 67 |MG. STY|LE="heig|
|00001340| 68 74 3a 20 32 2e 31 37 | 65 78 3b 20 76 65 72 74 |ht: 2.17|ex; vert|
|00001350| 69 63 61 6c 2d 61 6c 69 | 67 6e 3a 20 31 37 36 2e |ical-ali|gn: 176.|
|00001360| 34 31 65 78 3b 20 22 20 | 53 52 43 3d 22 69 6d 67 |41ex; " |SRC="img|
|00001370| 38 2e 70 6e 67 22 0a 20 | 41 4c 54 3d 22 5c 62 65 |8.png". |ALT="\be|
|00001380| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 73 69 |gin{func|desc}{si|
|00001390| 67 6e 61 6c 7d 7b 73 69 | 67 6e 61 6c 6e 75 6d 5c |gnal}{si|gnalnum\|
|000013a0| 2c 20 68 61 6e 64 6c 65 | 72 7d 0a 53 65 74 20 74 |, handle|r}.Set t|
|000013b0| 68 65 20 68 61 6e 64 6c | 65 72 20 66 6f 72 20 73 |he handl|er for s|
|000013c0| 69 67 6e 61 6c 20 5c 76 | 61 72 7b 73 2e 2e 2e 0a |ignal \v|ar{s....|
|000013d0| 2e 2e 2e 72 65 6e 63 65 | 20 6d 61 6e 75 61 6c 20 |...rence| manual |
|000013e0| 66 6f 72 20 61 20 64 65 | 73 63 72 69 70 74 69 6f |for a de|scriptio|
|000013f0| 6e 20 6f 66 20 66 72 61 | 6d 65 20 6f 62 6a 65 63 |n of fra|me objec|
|00001400| 74 73 29 2e 0a 5c 6f 62 | 69 6e 64 65 78 7b 66 72 |ts)..\ob|index{fr|
|00001410| 61 6d 65 7d 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ame}.\en|d{funcde|
|00001420| 73 63 7d 22 3e 0a 3c 42 | 52 3e 0a 3c 48 52 3e 0a |sc}">.<B|R>.<HR>.|
|00001430| 0a 3c 2f 42 4f 44 59 3e | 0a 3c 2f 48 54 4d 4c 3e |.</BODY>|.</HTML>|
|00001440| 0a | |. | |
+--------+-------------------------+-------------------------+--------+--------+