home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
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 6c 69 62 73 69 67 | 6e 61 6c 2e 63 73 73 22 |="libsig|nal.css"|
|000001b0| 3e 0a 0a 3c 4c 49 4e 4b | 20 52 45 4c 3d 22 70 72 |>..<LINK| REL="pr|
|000001c0| 65 76 69 6f 75 73 22 20 | 48 52 45 46 3d 22 6c 69 |evious" |HREF="li|
|000001d0| 62 73 69 67 6e 61 6c 5f | 6d 6e 2e 68 74 6d 6c 22 |bsignal_|mn.html"|
|000001e0| 3e 0a 3c 4c 49 4e 4b 20 | 52 45 4c 3d 22 75 70 22 |>.<LINK |REL="up"|
|000001f0| 20 48 52 45 46 3d 22 6c | 69 62 73 69 67 6e 61 6c | HREF="l|ibsignal|
|00000200| 5f 6d 6e 2e 68 74 6d 6c | 22 3e 0a 3c 2f 48 45 41 |_mn.html|">.</HEA|
|00000210| 44 3e 0a 20 0a 3c 42 4f | 44 59 20 62 67 63 6f 6c |D>. .<BO|DY bgcol|
|00000220| 6f 72 3d 22 23 66 66 66 | 66 66 66 22 20 74 65 78 |or="#fff|fff" tex|
|00000230| 74 3d 22 23 30 30 30 30 | 30 30 22 20 6c 69 6e 6b |t="#0000|00" link|
|00000240| 3d 22 23 39 39 34 34 45 | 45 22 20 76 6c 69 6e 6b |="#9944E|E" vlink|
|00000250| 3d 22 23 30 30 30 30 66 | 66 22 20 61 6c 69 6e 6b |="#0000f|f" alink|
|00000260| 3d 22 23 30 30 66 66 30 | 30 22 3e 0a 0a 3c 48 31 |="#00ff0|0">..<H1|
|00000270| 3e 3c 41 20 49 44 3d 22 | 53 45 43 54 49 4f 4e 30 |><A ID="|SECTION0|
|00000280| 30 30 31 30 30 30 30 30 | 30 30 30 30 30 30 30 30 |00100000|00000000|
|00000290| 30 30 30 22 3e 0a 42 75 | 69 6c 74 2d 69 6e 20 4d |000">.Bu|ilt-in M|
|000002a0| 6f 64 75 6c 65 20 73 69 | 67 6e 61 6c 3c 2f 41 3e |odule si|gnal</A>|
|000002b0| 0a 3c 2f 48 31 3e 0a 0a | 3c 50 3e 0a 73 69 67 6e |.</H1>..|<P>.sign|
|000002c0| 61 6c 0a 54 68 69 73 20 | 6d 6f 64 75 6c 65 20 70 |al.This |module p|
|000002d0| 72 6f 76 69 64 65 73 20 | 6d 65 63 68 61 6e 69 73 |rovides |mechanis|
|000002e0| 6d 73 20 74 6f 20 75 73 | 65 20 73 69 67 6e 61 6c |ms to us|e signal|
|000002f0| 20 68 61 6e 64 6c 65 72 | 73 20 69 6e 20 50 79 74 | handler|s in Pyt|
|00000300| 68 6f 6e 2e 0a 53 6f 6d | 65 20 67 65 6e 65 72 61 |hon..Som|e genera|
|00000310| 6c 20 72 75 6c 65 73 20 | 66 6f 72 20 77 6f 72 6b |l rules |for work|
|00000320| 69 6e 67 20 77 69 74 68 | 20 73 69 67 6e 61 6c 73 |ing with| signals|
|00000330| 20 68 61 6e 64 6c 65 72 | 73 3a 0a 0a 3c 50 3e 0a | handler|s:..<P>.|
|00000340| 0a 3c 55 4c 3e 0a 3c 4c | 49 3e 41 20 68 61 6e 64 |.<UL>.<L|I>A hand|
|00000350| 6c 65 72 20 66 6f 72 20 | 61 20 70 61 72 74 69 63 |ler for |a partic|
|00000360| 75 6c 61 72 20 73 69 67 | 6e 61 6c 2c 20 6f 6e 63 |ular sig|nal, onc|
|00000370| 65 20 73 65 74 2c 20 72 | 65 6d 61 69 6e 73 20 69 |e set, r|emains i|
|00000380| 6e 73 74 61 6c 6c 65 64 | 20 75 6e 74 69 6c 0a 69 |nstalled| until.i|
|00000390| 74 20 69 73 20 65 78 70 | 6c 69 63 69 74 6c 79 20 |t is exp|licitly |
|000003a0| 72 65 73 65 74 20 28 69 | 2e 65 2e 20 50 79 74 68 |reset (i|.e. Pyth|
|000003b0| 6f 6e 20 65 6d 75 6c 61 | 74 65 73 20 74 68 65 20 |on emula|tes the |
|000003c0| 42 53 44 20 73 74 79 6c | 65 20 69 6e 74 65 72 66 |BSD styl|e interf|
|000003d0| 61 63 65 0a 72 65 67 61 | 72 64 6c 65 73 73 20 6f |ace.rega|rdless o|
|000003e0| 66 20 74 68 65 20 75 6e | 64 65 72 6c 79 69 6e 67 |f the un|derlying|
|000003f0| 20 69 6d 70 6c 65 6d 65 | 6e 74 61 74 69 6f 6e 29 | impleme|ntation)|
|00000400| 2c 20 77 69 74 68 20 74 | 68 65 20 65 78 63 65 70 |, with t|he excep|
|00000410| 74 69 6f 6e 20 6f 66 0a | 74 68 65 20 68 61 6e 64 |tion of.|the hand|
|00000420| 6c 65 72 20 66 6f 72 20 | 53 49 47 43 48 4c 44 2c |ler for |SIGCHLD,|
|00000430| 20 77 68 69 63 68 20 66 | 6f 6c 6c 6f 77 73 20 74 | which f|ollows t|
|00000440| 68 65 20 75 6e 64 65 72 | 6c 79 69 6e 67 0a 69 6d |he under|lying.im|
|00000450| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 2e 0a 0a 3c |plementa|tion...<|
|00000460| 50 3e 0a 3c 2f 4c 49 3e | 0a 3c 4c 49 3e 54 68 65 |P>.</LI>|.<LI>The|
|00000470| 72 65 20 69 73 20 6e 6f | 20 77 61 79 20 74 6f 20 |re is no| way to |
|00000480| 60 60 62 6c 6f 63 6b 27 | 27 20 73 69 67 6e 61 6c |``block'|' signal|
|00000490| 73 20 74 65 6d 70 6f 72 | 61 72 69 6c 79 20 66 72 |s tempor|arily fr|
|000004a0| 6f 6d 20 63 72 69 74 69 | 63 61 6c 0a 73 65 63 74 |om criti|cal.sect|
|000004b0| 69 6f 6e 73 20 28 73 69 | 6e 63 65 20 74 68 69 73 |ions (si|nce this|
|000004c0| 20 69 73 20 6e 6f 74 20 | 73 75 70 70 6f 72 74 65 | is not |supporte|
|000004d0| 64 20 62 79 20 61 6c 6c | 20 20 66 6c 61 76 6f 72 |d by all| flavor|
|000004e0| 73 29 2e 0a 0a 3c 50 3e | 0a 3c 2f 4c 49 3e 0a 3c |s)...<P>|.</LI>.<|
|000004f0| 4c 49 3e 41 6c 74 68 6f | 75 67 68 20 50 79 74 68 |LI>Altho|ugh Pyth|
|00000500| 6f 6e 20 73 69 67 6e 61 | 6c 20 68 61 6e 64 6c 65 |on signa|l handle|
|00000510| 72 73 20 61 72 65 20 63 | 61 6c 6c 65 64 20 61 73 |rs are c|alled as|
|00000520| 79 6e 63 68 72 6f 6e 6f | 75 73 6c 79 20 61 73 20 |ynchrono|usly as |
|00000530| 66 61 72 20 61 73 0a 74 | 68 65 20 50 79 74 68 6f |far as.t|he Pytho|
|00000540| 6e 20 75 73 65 72 20 69 | 73 20 63 6f 6e 63 65 72 |n user i|s concer|
|00000550| 6e 65 64 2c 20 74 68 65 | 79 20 63 61 6e 20 6f 6e |ned, the|y can on|
|00000560| 6c 79 20 6f 63 63 75 72 | 20 62 65 74 77 65 65 6e |ly occur| between|
|00000570| 20 74 68 65 0a 60 60 61 | 74 6f 6d 69 63 27 27 20 | the.``a|tomic'' |
|00000580| 69 6e 73 74 72 75 63 74 | 69 6f 6e 73 20 6f 66 20 |instruct|ions of |
|00000590| 74 68 65 20 50 79 74 68 | 6f 6e 20 69 6e 74 65 72 |the Pyth|on inter|
|000005a0| 70 72 65 74 65 72 2e 20 | 20 54 68 69 73 20 6d 65 |preter. | This me|
|000005b0| 61 6e 73 20 74 68 61 74 | 0a 73 69 67 6e 61 6c 73 |ans that|.signals|
|000005c0| 20 61 72 72 69 76 69 6e | 67 20 64 75 72 69 6e 67 | arrivin|g during|
|000005d0| 20 6c 6f 6e 67 20 63 61 | 6c 63 75 6c 61 74 69 6f | long ca|lculatio|
|000005e0| 6e 73 20 69 6d 70 6c 65 | 6d 65 6e 74 65 64 20 70 |ns imple|mented p|
|000005f0| 75 72 65 6c 79 20 69 6e | 20 43 0a 28 65 2e 67 2e |urely in| C.(e.g.|
|00000600| 20 72 65 67 75 6c 61 72 | 20 65 78 70 72 65 73 73 | regular| express|
|00000610| 69 6f 6e 20 6d 61 74 63 | 68 65 73 20 6f 6e 20 6c |ion matc|hes on l|
|00000620| 61 72 67 65 20 62 6f 64 | 69 65 73 20 6f 66 20 74 |arge bod|ies of t|
|00000630| 65 78 74 29 20 6d 61 79 | 20 62 65 0a 64 65 6c 61 |ext) may| be.dela|
|00000640| 79 65 64 20 66 6f 72 20 | 61 6e 20 61 72 62 69 74 |yed for |an arbit|
|00000650| 72 61 72 79 20 61 6d 6f | 75 6e 74 20 6f 66 20 74 |rary amo|unt of t|
|00000660| 69 6d 65 2e 0a 0a 3c 50 | 3e 0a 3c 2f 4c 49 3e 0a |ime...<P|>.</LI>.|
|00000670| 3c 4c 49 3e 57 68 65 6e | 20 61 20 73 69 67 6e 61 |<LI>When| a signa|
|00000680| 6c 20 61 72 72 69 76 65 | 73 20 64 75 72 69 6e 67 |l arrive|s during|
|00000690| 20 61 6e 20 49 2f 4f 20 | 6f 70 65 72 61 74 69 6f | an I/O |operatio|
|000006a0| 6e 2c 20 69 74 20 69 73 | 20 70 6f 73 73 69 62 6c |n, it is| possibl|
|000006b0| 65 20 74 68 61 74 20 74 | 68 65 0a 49 2f 4f 20 6f |e that t|he.I/O o|
|000006c0| 70 65 72 61 74 69 6f 6e | 20 72 61 69 73 65 73 20 |peration| raises |
|000006d0| 61 6e 20 65 78 63 65 70 | 74 69 6f 6e 20 61 66 74 |an excep|tion aft|
|000006e0| 65 72 20 74 68 65 20 73 | 69 67 6e 61 6c 20 68 61 |er the s|ignal ha|
|000006f0| 6e 64 6c 65 72 20 72 65 | 74 75 72 6e 73 2e 0a 54 |ndler re|turns..T|
|00000700| 68 69 73 20 69 73 20 64 | 65 70 65 6e 64 65 6e 74 |his is d|ependent|
|00000710| 20 6f 6e 20 74 68 65 20 | 75 6e 64 65 72 6c 79 69 | on the |underlyi|
|00000720| 6e 67 20 20 73 79 73 74 | 65 6d 27 73 20 73 65 6d |ng syst|em's sem|
|00000730| 61 6e 74 69 63 73 20 72 | 65 67 61 72 64 69 6e 67 |antics r|egarding|
|00000740| 0a 69 6e 74 65 72 72 75 | 70 74 65 64 20 73 79 73 |.interru|pted sys|
|00000750| 74 65 6d 20 63 61 6c 6c | 73 2e 0a 0a 3c 50 3e 0a |tem call|s...<P>.|
|00000760| 3c 2f 4c 49 3e 0a 3c 4c | 49 3e 42 65 63 61 75 73 |</LI>.<L|I>Becaus|
|00000770| 65 20 74 68 65 20 43 20 | 73 69 67 6e 61 6c 20 68 |e the C |signal h|
|00000780| 61 6e 64 6c 65 72 20 61 | 6c 77 61 79 73 20 72 65 |andler a|lways re|
|00000790| 74 75 72 6e 73 2c 20 69 | 74 20 6d 61 6b 65 73 20 |turns, i|t makes |
|000007a0| 6c 69 74 74 6c 65 20 73 | 65 6e 73 65 20 74 6f 0a |little s|ense to.|
|000007b0| 63 61 74 63 68 20 73 79 | 6e 63 68 72 6f 6e 6f 75 |catch sy|nchronou|
|000007c0| 73 20 65 72 72 6f 72 73 | 20 6c 69 6b 65 20 53 49 |s errors| like SI|
|000007d0| 47 46 50 45 20 6f 72 20 | 53 49 47 53 45 47 56 2e |GFPE or |SIGSEGV.|
|000007e0| 0a 0a 3c 50 3e 0a 3c 2f | 4c 49 3e 0a 3c 4c 49 3e |..<P>.</|LI>.<LI>|
|000007f0| 50 79 74 68 6f 6e 20 69 | 6e 73 74 61 6c 6c 73 20 |Python i|nstalls |
|00000800| 61 20 73 6d 61 6c 6c 20 | 6e 75 6d 62 65 72 20 6f |a small |number o|
|00000810| 66 20 73 69 67 6e 61 6c | 20 68 61 6e 64 6c 65 72 |f signal| handler|
|00000820| 73 20 62 79 20 64 65 66 | 61 75 6c 74 3a 0a 53 49 |s by def|ault:.SI|
|00000830| 47 50 49 50 45 20 69 73 | 20 69 67 6e 6f 72 65 64 |GPIPE is| ignored|
|00000840| 20 28 73 6f 20 77 72 69 | 74 65 20 65 72 72 6f 72 | (so wri|te error|
|00000850| 73 20 6f 6e 20 70 69 70 | 65 73 20 61 6e 64 20 73 |s on pip|es and s|
|00000860| 6f 63 6b 65 74 73 20 63 | 61 6e 20 62 65 0a 72 65 |ockets c|an be.re|
|00000870| 70 6f 72 74 65 64 20 61 | 73 20 6f 72 64 69 6e 61 |ported a|s ordina|
|00000880| 72 79 20 50 79 74 68 6f | 6e 20 65 78 63 65 70 74 |ry Pytho|n except|
|00000890| 69 6f 6e 73 29 2c 20 53 | 49 47 49 4e 54 20 69 73 |ions), S|IGINT is|
|000008a0| 20 74 72 61 6e 73 6c 61 | 74 65 64 0a 69 6e 74 6f | transla|ted.into|
|000008b0| 20 61 20 4b 65 79 62 6f | 61 72 64 49 6e 74 65 72 | a Keybo|ardInter|
|000008c0| 72 75 70 74 20 65 78 63 | 65 70 74 69 6f 6e 2c 20 |rupt exc|eption, |
|000008d0| 61 6e 64 20 53 49 47 54 | 45 52 4d 20 69 73 0a 63 |and SIGT|ERM is.c|
|000008e0| 61 75 67 68 74 20 73 6f | 20 74 68 61 74 20 6e 65 |aught so| that ne|
|000008f0| 63 65 73 73 61 72 79 20 | 63 6c 65 61 6e 75 70 20 |cessary |cleanup |
|00000900| 28 65 73 70 65 63 69 61 | 6c 6c 79 20 73 79 73 2e |(especia|lly sys.|
|00000910| 65 78 69 74 66 75 6e 63 | 29 20 63 61 6e 0a 62 65 |exitfunc|) can.be|
|00000920| 20 70 65 72 66 6f 72 6d | 65 64 20 62 65 66 6f 72 | perform|ed befor|
|00000930| 65 20 61 63 74 75 61 6c | 6c 79 20 74 65 72 6d 69 |e actual|ly termi|
|00000940| 6e 61 74 69 6e 67 2e 20 | 20 41 6c 6c 20 6f 66 20 |nating. | All of |
|00000950| 74 68 65 73 65 20 63 61 | 6e 20 62 65 0a 6f 76 65 |these ca|n be.ove|
|00000960| 72 72 69 64 64 65 6e 2e | 0a 0a 3c 50 3e 0a 3c 2f |rridden.|..<P>.</|
|00000970| 4c 49 3e 0a 3c 4c 49 3e | 53 6f 6d 65 20 63 61 72 |LI>.<LI>|Some car|
|00000980| 65 20 6d 75 73 74 20 62 | 65 20 74 61 6b 65 6e 20 |e must b|e taken |
|00000990| 69 66 20 62 6f 74 68 20 | 73 69 67 6e 61 6c 73 20 |if both |signals |
|000009a0| 61 6e 64 20 74 68 72 65 | 61 64 73 20 61 72 65 20 |and thre|ads are |
|000009b0| 75 73 65 64 20 69 6e 20 | 74 68 65 0a 73 61 6d 65 |used in |the.same|
|000009c0| 20 70 72 6f 67 72 61 6d | 2e 20 20 54 68 65 20 66 | program|. The f|
|000009d0| 75 6e 64 61 6d 65 6e 74 | 61 6c 20 74 68 69 6e 67 |undament|al thing|
|000009e0| 20 74 6f 20 72 65 6d 65 | 6d 62 65 72 20 69 6e 20 | to reme|mber in |
|000009f0| 75 73 69 6e 67 20 73 69 | 67 6e 61 6c 73 20 61 6e |using si|gnals an|
|00000a00| 64 0a 74 68 72 65 61 64 | 73 20 73 69 6d 75 6c 74 |d.thread|s simult|
|00000a10| 61 6e 65 6f 75 73 6c 79 | 20 69 73 3a 20 61 6c 77 |aneously| is: alw|
|00000a20| 61 79 73 20 70 65 72 66 | 6f 72 6d 20 73 69 67 6e |ays perf|orm sign|
|00000a30| 61 6c 28 29 20 6f 70 65 | 72 61 74 69 6f 6e 73 0a |al() ope|rations.|
|00000a40| 69 6e 20 74 68 65 20 6d | 61 69 6e 20 74 68 72 65 |in the m|ain thre|
|00000a50| 61 64 20 6f 66 20 65 78 | 65 63 75 74 69 6f 6e 2e |ad of ex|ecution.|
|00000a60| 20 20 41 6e 79 20 74 68 | 72 65 61 64 20 63 61 6e | Any th|read can|
|00000a70| 20 70 65 72 66 6f 72 6d | 20 61 6e 0a 61 6c 61 72 | perform| an.alar|
|00000a80| 6d 28 29 2c 20 67 65 74 | 73 69 67 6e 61 6c 28 29 |m(), get|signal()|
|00000a90| 2c 20 6f 72 20 70 61 75 | 73 65 28 29 3b 20 6f 6e |, or pau|se(); on|
|00000aa0| 6c 79 20 74 68 65 20 6d | 61 69 6e 0a 74 68 72 65 |ly the m|ain.thre|
|00000ab0| 61 64 20 63 61 6e 20 73 | 65 74 20 61 20 6e 65 77 |ad can s|et a new|
|00000ac0| 20 73 69 67 6e 61 6c 20 | 68 61 6e 64 6c 65 72 2c | signal |handler,|
|00000ad0| 20 61 6e 64 20 74 68 65 | 20 6d 61 69 6e 20 74 68 | and the| main th|
|00000ae0| 72 65 61 64 20 77 69 6c | 6c 20 62 65 20 74 68 65 |read wil|l be the|
|00000af0| 0a 6f 6e 6c 79 20 6f 6e | 65 20 74 6f 20 72 65 63 |.only on|e to rec|
|00000b00| 65 69 76 65 20 73 69 67 | 6e 61 6c 73 20 28 74 68 |eive sig|nals (th|
|00000b10| 69 73 20 69 73 20 65 6e | 66 6f 72 63 65 64 20 62 |is is en|forced b|
|00000b20| 79 20 74 68 65 20 50 79 | 74 68 6f 6e 20 73 69 67 |y the Py|thon sig|
|00000b30| 6e 61 6c 0a 6d 6f 64 75 | 6c 65 2c 20 65 76 65 6e |nal.modu|le, even|
|00000b40| 20 69 66 20 74 68 65 20 | 75 6e 64 65 72 6c 79 69 | if the |underlyi|
|00000b50| 6e 67 20 74 68 72 65 61 | 64 20 69 6d 70 6c 65 6d |ng threa|d implem|
|00000b60| 65 6e 74 61 74 69 6f 6e | 20 73 75 70 70 6f 72 74 |entation| support|
|00000b70| 73 20 73 65 6e 64 69 6e | 67 0a 73 69 67 6e 61 6c |s sendin|g.signal|
|00000b80| 73 20 74 6f 20 69 6e 64 | 69 76 69 64 75 61 6c 20 |s to ind|ividual |
|00000b90| 74 68 72 65 61 64 73 29 | 2e 20 20 54 68 69 73 20 |threads)|. This |
|00000ba0| 6d 65 61 6e 73 20 74 68 | 61 74 20 73 69 67 6e 61 |means th|at signa|
|00000bb0| 6c 73 20 63 61 6e 27 74 | 20 62 65 20 75 73 65 64 |ls can't| be used|
|00000bc0| 0a 61 73 20 61 20 6d 65 | 61 6e 73 20 6f 66 20 69 |.as a me|ans of i|
|00000bd0| 6e 74 65 72 74 68 72 65 | 61 64 20 63 6f 6d 6d 75 |nterthre|ad commu|
|00000be0| 6e 69 63 61 74 69 6f 6e | 2e 20 20 55 73 65 20 6c |nication|. Use l|
|00000bf0| 6f 63 6b 73 20 69 6e 73 | 74 65 61 64 2e 0a 0a 3c |ocks ins|tead...<|
|00000c00| 50 3e 0a 3c 2f 4c 49 3e | 0a 3c 2f 55 4c 3e 0a 0a |P>.</LI>|.</UL>..|
|00000c10| 3c 50 3e 0a 54 68 65 20 | 76 61 72 69 61 62 6c 65 |<P>.The |variable|
|00000c20| 73 20 64 65 66 69 6e 65 | 64 20 69 6e 20 74 68 65 |s define|d in the|
|00000c30| 20 73 69 67 6e 61 6c 20 | 6d 6f 64 75 6c 65 20 61 | signal |module a|
|00000c40| 72 65 3a 0a 0a 3c 50 3e | 0a 0a 3c 42 52 3e 0a 3c |re:..<P>|..<BR>.<|
|00000c50| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000c60| 67 68 74 3a 20 31 39 36 | 2e 32 35 65 78 3b 20 76 |ght: 196|.25ex; v|
|00000c70| 65 72 74 69 63 61 6c 2d | 61 6c 69 67 6e 3a 20 2d |ertical-|align: -|
|00000c80| 30 2e 35 37 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |0.57ex; |" SRC="i|
|00000c90| 6d 67 31 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg1.png"|. ALT="\|
|00000ca0| 62 65 67 69 6e 7b 64 61 | 74 61 64 65 73 63 7d 7b |begin{da|tadesc}{|
|00000cb0| 53 49 47 5f 44 46 4c 7d | 0a 54 68 69 73 20 69 73 |SIG_DFL}|.This is|
|00000cc0| 20 6f 6e 65 20 6f 66 20 | 74 77 6f 20 73 74 61 6e | one of |two stan|
|00000cd0| 64 61 72 64 20 73 69 67 | 6e 61 6c 20 68 61 6e 64 |dard sig|nal hand|
|00000ce0| 6c 69 6e 67 20 6f 70 74 | 69 6f 6e 73 3b 20 2e 2e |ling opt|ions; ..|
|00000cf0| 2e 0a 2e 2e 2e 78 69 74 | 2c 0a 77 68 69 6c 65 20 |.....xit|,.while |
|00000d00| 74 68 65 20 64 65 66 61 | 75 6c 74 20 61 63 74 69 |the defa|ult acti|
|00000d10| 6f 6e 20 66 6f 72 20 53 | 49 47 43 4c 44 20 69 73 |on for S|IGCLD is|
|00000d20| 20 74 6f 20 73 69 6d 70 | 6c 79 20 69 67 6e 6f 72 | to simp|ly ignor|
|00000d30| 65 20 69 74 2e 0a 5c 65 | 6e 64 7b 64 61 74 61 64 |e it..\e|nd{datad|
|00000d40| 65 73 63 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |esc}">.<|BR>..<P>|
|00000d50| 0a 3c 42 52 3e 0a 3c 49 | 4d 47 0a 20 20 53 54 59 |.<BR>.<I|MG. STY|
|00000d60| 4c 45 3d 22 68 65 69 67 | 68 74 3a 20 32 2e 31 37 |LE="heig|ht: 2.17|
|00000d70| 65 78 3b 20 76 65 72 74 | 69 63 61 6c 2d 61 6c 69 |ex; vert|ical-ali|
|00000d80| 67 6e 3a 20 31 37 36 2e | 36 38 65 78 3b 20 22 20 |gn: 176.|68ex; " |
|00000d90| 53 52 43 3d 22 69 6d 67 | 32 2e 70 6e 67 22 0a 20 |SRC="img|2.png". |
|00000da0| 41 4c 54 3d 22 5c 62 65 | 67 69 6e 7b 64 61 74 61 |ALT="\be|gin{data|
|00000db0| 64 65 73 63 7d 7b 53 49 | 47 5f 49 47 4e 7d 0a 54 |desc}{SI|G_IGN}.T|
|00000dc0| 68 69 73 20 69 73 20 61 | 6e 6f 74 68 65 72 20 73 |his is a|nother s|
|00000dd0| 74 61 6e 64 61 72 64 20 | 73 69 67 6e 61 6c 20 68 |tandard |signal h|
|00000de0| 61 6e 64 6c 65 72 2c 20 | 77 68 69 63 68 20 77 69 |andler, |which wi|
|00000df0| 6c 6c 20 73 69 6d 70 6c | 79 20 69 67 6e 6f 72 65 |ll simpl|y ignore|
|00000e00| 0a 74 68 65 20 67 69 76 | 65 6e 20 73 69 67 6e 61 |.the giv|en signa|
|00000e10| 6c 2e 0a 5c 65 6e 64 7b | 64 61 74 61 64 65 73 63 |l..\end{|datadesc|
|00000e20| 7d 22 3e 0a 3c 42 52 3e | 0a 0a 3c 50 3e 0a 3c 42 |}">.<BR>|..<P>.<B|
|00000e30| 52 3e 0a 3c 49 4d 47 0a | 20 20 53 54 59 4c 45 3d |R>.<IMG.| STYLE=|
|00000e40| 22 68 65 69 67 68 74 3a | 20 32 2e 31 37 65 78 3b |"height:| 2.17ex;|
|00000e50| 20 76 65 72 74 69 63 61 | 6c 2d 61 6c 69 67 6e 3a | vertica|l-align:|
|00000e60| 20 31 37 36 2e 35 35 65 | 78 3b 20 22 20 53 52 43 | 176.55e|x; " SRC|
|00000e70| 3d 22 69 6d 67 33 2e 70 | 6e 67 22 0a 20 41 4c 54 |="img3.p|ng". ALT|
|00000e80| 3d 22 5c 62 65 67 69 6e | 7b 64 61 74 61 64 65 73 |="\begin|{datades|
|00000e90| 63 7d 7b 53 49 47 2a 7d | 0a 41 6c 6c 20 74 68 65 |c}{SIG*}|.All the|
|00000ea0| 20 73 69 67 6e 61 6c 20 | 6e 75 6d 62 65 72 73 20 | signal |numbers |
|00000eb0| 61 72 65 20 64 65 66 69 | 6e 65 64 20 73 79 6d 62 |are defi|ned symb|
|00000ec0| 6f 6c 69 63 61 6c 6c 79 | 2e 20 46 6f 72 20 65 78 |olically|. For ex|
|00000ed0| 61 2e 2e 2e 0a 2e 2e 2e | 6c 79 0a 74 68 6f 73 65 |a.......|ly.those|
|00000ee0| 20 6e 61 6d 65 73 20 64 | 65 66 69 6e 65 64 20 62 | names d|efined b|
|00000ef0| 79 20 74 68 65 20 73 79 | 73 74 65 6d 20 61 72 65 |y the sy|stem are|
|00000f00| 20 64 65 66 69 6e 65 64 | 20 62 79 20 74 68 69 73 | defined| by this|
|00000f10| 20 6d 6f 64 75 6c 65 2e | 0a 5c 65 6e 64 7b 64 61 | module.|.\end{da|
|00000f20| 74 61 64 65 73 63 7d 22 | 3e 0a 3c 42 52 3e 0a 0a |tadesc}"|>.<BR>..|
|00000f30| 3c 50 3e 0a 3c 42 52 3e | 0a 3c 49 4d 47 0a 20 20 |<P>.<BR>|.<IMG. |
|00000f40| 53 54 59 4c 45 3d 22 68 | 65 69 67 68 74 3a 20 32 |STYLE="h|eight: 2|
|00000f50| 2e 32 34 65 78 3b 20 76 | 65 72 74 69 63 61 6c 2d |.24ex; v|ertical-|
|00000f60| 61 6c 69 67 6e 3a 20 31 | 37 36 2e 35 34 65 78 3b |align: 1|76.54ex;|
|00000f70| 20 22 20 53 52 43 3d 22 | 69 6d 67 34 2e 70 6e 67 | " SRC="|img4.png|
|00000f80| 22 0a 20 41 4c 54 3d 22 | 5c 62 65 67 69 6e 7b 64 |". ALT="|\begin{d|
|00000f90| 61 74 61 64 65 73 63 7d | 7b 4e 53 49 47 7d 0a 4f |atadesc}|{NSIG}.O|
|00000fa0| 6e 65 20 6d 6f 72 65 20 | 74 68 61 6e 20 74 68 65 |ne more |than the|
|00000fb0| 20 6e 75 6d 62 65 72 20 | 6f 66 20 74 68 65 20 68 | number |of the h|
|00000fc0| 69 67 68 65 73 74 20 73 | 69 67 6e 61 6c 20 6e 75 |ighest s|ignal nu|
|00000fd0| 6d 62 65 72 2e 0a 5c 65 | 6e 64 7b 64 61 74 61 64 |mber..\e|nd{datad|
|00000fe0| 65 73 63 7d 22 3e 0a 3c | 42 52 3e 0a 0a 3c 50 3e |esc}">.<|BR>..<P>|
|00000ff0| 0a 54 68 65 20 73 69 67 | 6e 61 6c 20 6d 6f 64 75 |.The sig|nal modu|
|00001000| 6c 65 20 64 65 66 69 6e | 65 73 20 74 68 65 20 66 |le defin|es the f|
|00001010| 6f 6c 6c 6f 77 69 6e 67 | 20 66 75 6e 63 74 69 6f |ollowing| functio|
|00001020| 6e 73 3a 0a 0a 3c 50 3e | 0a 3c 42 52 3e 0a 3c 49 |ns:..<P>|.<BR>.<I|
|00001030| 4d 47 0a 20 20 53 54 59 | 4c 45 3d 22 68 65 69 67 |MG. STY|LE="heig|
|00001040| 68 74 3a 20 32 2e 31 37 | 65 78 3b 20 76 65 72 74 |ht: 2.17|ex; vert|
|00001050| 69 63 61 6c 2d 61 6c 69 | 67 6e 3a 20 31 37 36 2e |ical-ali|gn: 176.|
|00001060| 35 35 65 78 3b 20 22 20 | 53 52 43 3d 22 69 6d 67 |55ex; " |SRC="img|
|00001070| 35 2e 70 6e 67 22 0a 20 | 41 4c 54 3d 22 5c 62 65 |5.png". |ALT="\be|
|00001080| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 61 6c |gin{func|desc}{al|
|00001090| 61 72 6d 7d 7b 74 69 6d | 65 7d 0a 49 66 20 5c 76 |arm}{tim|e}.If \v|
|000010a0| 61 72 7b 74 69 6d 65 7d | 20 69 73 20 6e 6f 6e 2d |ar{time}| is non-|
|000010b0| 7a 65 72 6f 2c 20 74 68 | 69 73 20 66 75 6e 63 74 |zero, th|is funct|
|000010c0| 69 6f 6e 20 72 65 71 75 | 65 73 74 73 2e 2e 2e 0a |ion requ|ests....|
|000010d0| 2e 2e 2e 63 75 72 72 65 | 6e 74 6c 79 20 73 63 68 |...curre|ntly sch|
|000010e0| 65 64 75 6c 65 64 2e 20 | 28 53 65 65 20 74 68 65 |eduled. |(See the|
|000010f0| 20 5c 55 4e 49 58 7b 7d | 20 6d 61 6e 20 70 61 67 | \UNIX{}| man pag|
|00001100| 65 0a 5c 63 6f 64 65 7b | 61 6c 61 72 6d 28 32 29 |e.\code{|alarm(2)|
|00001110| 7d 2e 29 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |}.).\end|{funcdes|
|00001120| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|00001130| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00001140| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|00001150| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00001160| 3a 20 31 37 36 2e 35 34 | 65 78 3b 20 22 20 53 52 |: 176.54|ex; " SR|
|00001170| 43 3d 22 69 6d 67 36 2e | 70 6e 67 22 0a 20 41 4c |C="img6.|png". AL|
|00001180| 54 3d 22 5c 62 65 67 69 | 6e 7b 66 75 6e 63 64 65 |T="\begi|n{funcde|
|00001190| 73 63 7d 7b 67 65 74 73 | 69 67 6e 61 6c 7d 7b 73 |sc}{gets|ignal}{s|
|000011a0| 69 67 6e 61 6c 6e 75 6d | 7d 0a 52 65 74 75 72 6e |ignalnum|}.Return|
|000011b0| 20 74 68 65 20 63 75 72 | 72 65 6e 74 20 73 69 67 | the cur|rent sig|
|000011c0| 6e 61 6c 20 68 61 6e 64 | 6c 65 72 20 66 6f 72 20 |nal hand|ler for |
|000011d0| 74 68 2e 2e 2e 0a 2e 2e | 2e 0a 74 68 61 74 20 74 |th......|..that t|
|000011e0| 68 65 20 70 72 65 76 69 | 6f 75 73 20 73 69 67 6e |he previ|ous sign|
|000011f0| 61 6c 20 68 61 6e 64 6c | 65 72 20 77 61 73 20 6e |al handl|er was n|
|00001200| 6f 74 20 69 6e 73 74 61 | 6c 6c 65 64 20 66 72 6f |ot insta|lled fro|
|00001210| 6d 20 50 79 74 68 6f 6e | 2e 0a 5c 65 6e 64 7b 66 |m Python|..\end{f|
|00001220| 75 6e 63 64 65 73 63 7d | 22 3e 0a 3c 42 52 3e 0a |uncdesc}|">.<BR>.|
|00001230| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|00001240| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|00001250| 32 2e 31 37 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.17ex; |vertical|
|00001260| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 35 35 65 78 |-align: |176.55ex|
|00001270| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 37 2e 70 6e |; " SRC=|"img7.pn|
|00001280| 67 22 0a 20 41 4c 54 3d | 22 5c 62 65 67 69 6e 7b |g". ALT=|"\begin{|
|00001290| 66 75 6e 63 64 65 73 63 | 7d 7b 70 61 75 73 65 7d |funcdesc|}{pause}|
|000012a0| 7b 7d 0a 43 61 75 73 65 | 20 74 68 65 20 70 72 6f |{}.Cause| the pro|
|000012b0| 63 65 73 73 20 74 6f 20 | 73 6c 65 65 70 20 75 6e |cess to |sleep un|
|000012c0| 74 69 6c 20 61 20 73 69 | 67 6e 61 6c 20 69 73 20 |til a si|gnal is |
|000012d0| 72 65 63 65 69 76 65 64 | 2e 2e 2e 0a 2e 2e 2e 64 |received|.......d|
|000012e0| 2e 20 52 65 74 75 72 6e | 73 20 6e 6f 74 68 69 6e |. Return|s nothin|
|000012f0| 67 2e 20 28 53 65 65 20 | 74 68 65 0a 5c 55 4e 49 |g. (See |the.\UNI|
|00001300| 58 7b 7d 20 6d 61 6e 20 | 70 61 67 65 20 5c 63 6f |X{} man |page \co|
|00001310| 64 65 7b 73 69 67 6e 61 | 6c 28 32 29 7d 2e 29 0a |de{signa|l(2)}.).|
|00001320| 5c 65 6e 64 7b 66 75 6e | 63 64 65 73 63 7d 22 3e |\end{fun|cdesc}">|
|00001330| 0a 3c 42 52 3e 0a 0a 3c | 50 3e 0a 3c 42 52 3e 0a |.<BR>..<|P>.<BR>.|
|00001340| 3c 49 4d 47 0a 20 20 53 | 54 59 4c 45 3d 22 68 65 |<IMG. S|TYLE="he|
|00001350| 69 67 68 74 3a 20 32 2e | 31 37 65 78 3b 20 76 65 |ight: 2.|17ex; ve|
|00001360| 72 74 69 63 61 6c 2d 61 | 6c 69 67 6e 3a 20 31 37 |rtical-a|lign: 17|
|00001370| 36 2e 34 31 65 78 3b 20 | 22 20 53 52 43 3d 22 69 |6.41ex; |" SRC="i|
|00001380| 6d 67 38 2e 70 6e 67 22 | 0a 20 41 4c 54 3d 22 5c |mg8.png"|. ALT="\|
|00001390| 62 65 67 69 6e 7b 66 75 | 6e 63 64 65 73 63 7d 7b |begin{fu|ncdesc}{|
|000013a0| 73 69 67 6e 61 6c 7d 7b | 73 69 67 6e 61 6c 6e 75 |signal}{|signalnu|
|000013b0| 6d 5c 2c 20 68 61 6e 64 | 6c 65 72 7d 0a 53 65 74 |m\, hand|ler}.Set|
|000013c0| 20 74 68 65 20 68 61 6e | 64 6c 65 72 20 66 6f 72 | the han|dler for|
|000013d0| 20 73 69 67 6e 61 6c 20 | 5c 76 61 72 7b 73 2e 2e | signal |\var{s..|
|000013e0| 2e 0a 2e 2e 2e 72 65 6e | 63 65 20 6d 61 6e 75 61 |.....ren|ce manua|
|000013f0| 6c 20 66 6f 72 20 61 20 | 64 65 73 63 72 69 70 74 |l for a |descript|
|00001400| 69 6f 6e 20 6f 66 20 66 | 72 61 6d 65 20 6f 62 6a |ion of f|rame obj|
|00001410| 65 63 74 73 29 2e 0a 5c | 6f 62 69 6e 64 65 78 7b |ects)..\|obindex{|
|00001420| 66 72 61 6d 65 7d 0a 5c | 65 6e 64 7b 66 75 6e 63 |frame}.\|end{func|
|00001430| 64 65 73 63 7d 22 3e 0a | 3c 42 52 3e 0a 3c 48 52 |desc}">.|<BR>.<HR|
|00001440| 3e 0a 0a 3c 2f 42 4f 44 | 59 3e 0a 3c 2f 48 54 4d |>..</BOD|Y>.</HTM|
|00001450| 4c 3e 0a | |L>. | |
+--------+-------------------------+-------------------------+--------+--------+