sigactio.2
来自「Unix操作系统minix 2.0源码」· 2 代码 · 共 1,421 行 · 第 1/2 页
2
1,421 行
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:05:54 1996%%Pages: (atend)%%DocumentFonts: (atend)/devps 180 dict def devps begin/res 10.000000 def/y_offset 843 def/X{exch}bind def/mm {transform round X round X itransform} bind def/r{rmoveto}bind def/m{moveto}bind def/l{lineto}bind def/rl{rlineto}bind def/st{stroke}bind def/gs{gsave}bind def/gr{grestore}bind def/cp{currentpoint}bind def/np{newpath}bind def/ct{curveto}bind defsystemdict /setpacking known { /savepacking currentpacking def true setpacking } if/m0{0 0 moveto}bind def/xc{//res div}bind def/yc{//res neg div //y_offset add}bind def/lc{yc X xc X l st}bind def/mc{yc X xc X m}bind def/el{gs /a X def a div 1 X scale cp np a xc 2 div 0 360 arc st gr}bind def/ar{cp 7 2 roll np xc 5 1 roll atan 3 1 roll atan X arc st}bind def/sp{yc X xc X 6 2 roll yc X xc X 6 2 roll yc X xc X 6 2 roll ct}bind def/V{//res neg div //y_offset addcurrentpoint pop Xm}bind def/H{//res div0 transform X round X itransform popcurrentpoint X popmoveto}bind def/h{//res div 0 r}bind def/v{//res neg div 0 X r}bind def/S{X H show}bind def/A{H //res div 1 index stringwidth pop sub 1 index length div 0 3 2 roll ashow}bind def/psize 10 def/height 0 def/cheight { height 0 ne { height } { psize } ifelse } bind def/slant 0 def/FF{findfont X dup 30 div 0 mm pop setlinewidth /psize X def [psize 0 cheight slant sin slant cos div mul cheight 0 0] makefont setfont}bind def/shade{gs /dy X def /dx X def np m 0 /dy rl /dx 0 rl 0 /dy neg rl /dx neg 0 rl closepath .9 setgray fillgr}bind def1 setlinecap/resolution res 72 mul def/startFig { /SavedState save def userdict maxlength dict begin currentpoint transform DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix itransform moveto /ury exch def /urx exch def /lly exch def /llx exch def /y exch 72 mul resolution div def /x exch 72 mul resolution div def currentpoint /cy exch def /cx exch def /sx x urx llx sub div def /sy y ury lly sub div def sx sy scale cx sx div llx sub cy sy div ury sub translate /DefFigCTM matrix currentmatrix def /initmatrix { DefFigCTM setmatrix } def /defaultmatrix { DefFigCTM exch copy } def /initgraphics { DocumentInitState setmiterlimit setgray setdash setlinejoin setlinecap setlinewidth setmatrix DefFigCTM setmatrix } def /showpage { initgraphics } def}bind def/clipFig { currentpoint 6 2 roll newpath 4 copy 4 2 roll moveto 6 -1 roll exch lineto exch lineto exch lineto closepath clip newpath moveto}bind def/doclip { llx lly urx ury clipFig } def/endFig { end SavedState restore}bind def/globalstart { fontnum psize slant height resolution currentpoint pagesave restore gsave }bind def/globalend { grestore moveto /resolution exch def /height exch def /slant exch def /psize exch def /fontnum exch def F /pagesave save def}bind def/fontnum 1 def systemdict /setpacking known { savepacking setpacking} ifend/BP{save mark devps begin m0/DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecapcurrentlinejoin currentdash currentgray currentmiterlimit ] cvx def}bind def/EP{end cleartomark restore showpage}def/Encoding-1 256 array def0 1 255 {Encoding-1 exch /.notdef put} forEncoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-BEncoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-bEncoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accentsEncoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessiEncoding-1dup 8#41 /copyright putdup 8#42 /registered putdup 8#43 /trademark putdup 8#44 /logicalnot putdup 8#45 /Eth putdup 8#46 /eth putdup 8#47 /Thorn putdup 8#50 /thorn putdup 8#51 /brokenbar putdup 8#52 /degree putdup 8#53 /divide putdup 8#54 /multiply putdup 8#55 /minus putdup 8#56 /onehalf putdup 8#57 /onequarter putdup 8#60 /threequarters putdup 8#101 /Aacute putdup 8#102 /Acircumflex putdup 8#103 /Adieresis putdup 8#104 /Agrave putdup 8#105 /Aring putdup 8#106 /Atilde putdup 8#107 /Ccedilla putdup 8#110 /Eacute putdup 8#111 /Ecircumflex putdup 8#112 /Edieresis putdup 8#113 /Egrave putdup 8#114 /Iacute putdup 8#115 /Icircumflex putdup 8#116 /Idieresis putdup 8#117 /Igrave putdup 8#120 /Ntilde putdup 8#121 /Oacute putdup 8#122 /Ocircumflex putdup 8#123 /Odieresis putdup 8#124 /Ograve putdup 8#125 /Otilde putdup 8#126 /Scaron putdup 8#127 /Uacute putdup 8#130 /Ucircumflex putdup 8#131 /Udieresis putdup 8#132 /Ugrave putdup 8#133 /Ydieresis putdup 8#134 /Zcaron putdup 8#135 /aacute putdup 8#136 /acircumflex putdup 8#137 /adieresis putdup 8#140 /agrave putdup 8#141 /aring putdup 8#142 /atilde putdup 8#143 /ccedilla putdup 8#144 /eacute putdup 8#145 /ecircumflex putdup 8#146 /edieresis putdup 8#147 /egrave putdup 8#150 /iacute putdup 8#151 /icircumflex putdup 8#152 /idieresis putdup 8#153 /igrave putdup 8#154 /ntilde putdup 8#155 /oacute putdup 8#156 /ocircumflex putdup 8#157 /odieresis putdup 8#160 /ograve putdup 8#161 /otilde putdup 8#162 /scaron putdup 8#163 /uacute putdup 8#164 /ucircumflex putdup 8#165 /udieresis putdup 8#166 /ugrave putdup 8#167 /ydieresis putdup 8#170 /zcaron putpop/Enc-dict 30 dict defEnc-dict /tmpstr1 50 string putEnc-dict /tmpstr2 50 string putEnc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put/AEnc-def { % arguments: the original font's name, encoding nrEnc-dict begintmpstr2 cvs /Enc-no exch def % Remember the number in a stringdup /OrigName exch def % remember the namefindfont dup maxlength dict /newdict exch def % get dictionary for new font{ exch dup /FID ne { exch newdict 3 1 roll put } { pop pop } % Ignore FID ifelse} forallnewdict begin/Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encodingcurrentdict /UniqueID known{ /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueIDend % newdict/FNlength OrigName tmpstr1 cvs length def % convert name, remember lengthFNlength 1 add Enc-no length add stringdup 0 OrigName tmpstr1 cvs putintervaldup FNlength (-) putintervaldup FNlength 1 add Enc-no putintervaldup 0 tmpstr1 0 FNlength getinterval putinterval % Add old namecvn dup newdict /FontName 3 2 roll put newdict definefontend % Enc-dict} def/Times-Roman 1 AEnc-def pop/R-1{/Times-Roman-1 FF}def/Times-Bold 1 AEnc-def pop/B-1{/Times-Bold-1 FF}def/R{/Times-Roman FF}def/B{/Times-Bold FF}def/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(SIGACTION)S1273(\()S1315(2)S1373(\))S2696(Eighth)S(Edition)296 2989 A4574(SIGACTION)S5127(\()S5169(2)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(sigaction,)S1493(signal)S10 R-11758(-)S10 R1840(manage)S2178(signal)S2443(state)S2653(and)S2823(handlers)S1248 V9 R720(S)S722(SY)S774(YN)S842(NO)S910(OP)S978(PS)S1030(SI)S1082(IS)S1115(S)S1368 V10 B1080(#include)S1482(<signal.h>)S1608 V1080(int)S1236(sigaction\(int)S10 I1806(sig)S10 B1923(,)S1986(const)S2248(struct)S2539(sigaction)S2957(*)S10 I3007(act)S10 B3130(,)S3193(struct)S3484(sigaction)S3902(*)S10 I3952(oact)S10 B4125(\))S1728 V1080(void)S1302(\(*signal\(int)S10 I1827(sig)S10 B1944(,)S2007(void)S2229(\(*)S10 I(handler)312 2313 A10 B(\)\(int\)\)\)\(int\);)508 2625 A1896 V9 R720(D)S722(DE)S790(ES)S848(SC)S900(CR)S962(RI)S1024(IP)S1057(PT)S1109(TI)S1167(IO)S1200(ON)S1268(N)S2016 V10 B1080(Sigaction\(\))S10 R1573(is)S1668(used)S1880(to)S1986(examine,)S2380(set,)S2545(or)S2657(modify)S2975(the)S3126(attributes)S3529(of)S3641(a)S3714(signal.)S4032(The)S4218(argument)S10 I4627(sig)S10 R4773(is)S4869(the)S5021(signal)S2136 V1080(in)S1199(question.)S1630(The)S10 I1828(act)S10 R1992(argument)S2413(points)S2699(to)S2818(a)S2903(structure)S3296(containing)S3760(the)S3923(new)S4131(attributes)S4546(of)S4670(the)S4833(signal,)S5138(the)S2256 V1080(structure)S1458(pointed)S1784(to)S1887(by)S10 I2012(oact)S10 R(will)157 2210 A(receive)292 2392 A2709(the)S2857(old)S3010(attributes)S3410(that)S3586(were)S3808(in)S3911(effect)S4167(before)S4450(the)S4598(call.)S2424 V1080(The)S10 I1263(act)S10 R1412(and)S10 I1583(oact)S10 R1782(arguments)S2227(may)S2426(be)S10 B2547(NULL)S10 R2853(to)S2957(indicate)S3302(that)S3479(either)S3735(no)S3861(new)S4055(attributes)S4457(are)S4608(to)S4713(be)S4835(set,)S4999(or)S5110(that)S2544 V1080(the)S1228(old)S1381(attributes)S1781(are)S1930(not)S2083(of)S2192(interest.)S2712 V1080(The)S1262(structure)S1640(containing)S2089(the)S2237(signal)S2502(attributes)S2902(is)S2994(de\256ned)S3315(in)S3418(<signal.h>)S3872(and)S(looks)217 4042 A4284(like)S4460(this:)S2880 V10 B1440(struct)S1718(sigaction)S2123({)S3000 V1640(void)S2240(\(*sa_handler\)\(int)S3010(sig\);)S3120 V1640(sigset_t)S2240(sa_mask;)S3240 V1640(int)S2240(sa_\257ags;)S3360 V1440(};)S3528 V10 R1080(The)S10 B1262(sa_handler)S10 R1762(\256eld)S1966(contains)S2326(the)S2474(address)S2801(of)S2910(a)S2980(signal)S3245(handler,)S3597(a)S3668(function)S4029(that)S4206(is)S4299(called)S4566(when)S4810(the)S4959(process)S3648 V1080(is)S1172(signalled,)S1585(or)S1694(one)S1864(of)S1973(these)S2205(special)S2510(constants:)S3816 V10 B1080(SIG_DFL)S10 R1680(Default)S2008(signal)S2273(handling)S2649(is)S2741(to)S2844(be)S2964(performed.)S3459(This)S3663(usually)S3978(means)S4260(that)S4437(the)S4586(process)S4914(is)S(killed,)254 5007 A3936 V1680(but)S1833(some)S2070(signals)S2374(may)S2572(be)S(ignored)307 2692 A3024(by)S3149(default.)S4104 V10 B1080(SIG_IGN)S10 R(Ignore)263 1680 A1968(the)S2116(signal.)S4272 V1080(The)S10 B1273(sa_mask)S10 R1677(\256eld)S1892(indicates)S2287(a)S2369(set)S2518(of)S2639(signals)S2955(that)S3143(must)S3375(be)S3507(blocked)S3862(when)S4117(the)S4277(signal)S4554(is)S4658(being)S4918(handled.)S4392 V1080(Whether)S1453(the)S1602(signal)S10 I1868(sig)S10 R2011(itself)S2239(is)S2332(blocked)S2676(when)S2920(being)S3169(handled)S3513(is)S3606(not)S3760(controlled)S4193(by)S4318(this)S4488(mask.)S4775(The)S4957(mask)S5194(is)S4512 V1080(of)S1189(a)S1259("signal)S1565(set")S1743(type)S1941(that)S2117(is)S2209(to)S2312(be)S2432(manipulated)S2954(by)S3079(the)S10 B3227(sigset)S10 R3462(\(3\))S3605(functions.)S4680 V1080(How)S1306(the)S1459(signal)S1729(is)S1826(handled)S2174(precisely)S2568(is)S2665(speci\256ed)S3053(by)S3183(bits)S3358(in)S10 B3466(sa_\257ags)S10 R3800(.)S3880(If)S(none)195 3978 A4203(of)S4318(the)S4472(\257ags)S4693(is)S4791(set)S4934(then)S5138(the)S4800 V1080(handler)S1422(is)S1529(called)S1810(when)S2068(the)S2231(signal)S2511(arrives.)S2876(The)S3073(signal)S3353(is)S3460(blocked)S3818(during)S4120(the)S4283(call)S4469(to)S4587(the)S4750(handler,)S5116(and)S4920 V(unblocked)418 1080 A1537(when)S1794(the)S1956(handler)S2297(returns.)S2666(A)S2779(system)S3098(call)S3284(that)S3475(is)S3582(interrupted)S4064(returns)S10 B-14384(-)S10 B4441(1)S10 R4531(with)S10 B(errno)241 4750 A10 R5031(set)S5183(to)S5040 V10 B1080(EINTR)S10 R1399(.)S1474(The)S1656(following)S2072(bit)S2203(\257ags)S2418(can)S2583(be)S2703(set)S2840(to)S
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?