%!PS-Adobe-1.0 %%Creator: devps (Pipeline Associates, Inc.) %%CreationDate: Fri Sep 13 13:06:01 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 def systemdict /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 add currentpoint pop X m}bind def /H{//res div 0 transform X round X itransform pop currentpoint X pop moveto}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 fill gr}bind def 1 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} if end /BP{ save mark devps begin m0 /DocumentInitState [ matrix currentmatrix currentlinewidth currentlinecap currentlinejoin currentdash currentgray currentmiterlimit ] cvx def }bind def /EP{ end cleartomark restore showpage}def /Encoding-1 256 array def 0 1 255 {Encoding-1 exch /.notdef put} for Encoding-1 8#301 StandardEncoding 8#101 26 getinterval putinterval %A-B Encoding-1 8#341 StandardEncoding 8#141 26 getinterval putinterval %a-b Encoding-1 8#241 StandardEncoding 8#301 16 getinterval putinterval %accents Encoding-1 8#373 StandardEncoding 8#365 1 getinterval putinterval %dotlessi Encoding-1 dup 8#41 /copyright put dup 8#42 /registered put dup 8#43 /trademark put dup 8#44 /logicalnot put dup 8#45 /Eth put dup 8#46 /eth put dup 8#47 /Thorn put dup 8#50 /thorn put dup 8#51 /brokenbar put dup 8#52 /degree put dup 8#53 /divide put dup 8#54 /multiply put dup 8#55 /minus put dup 8#56 /onehalf put dup 8#57 /onequarter put dup 8#60 /threequarters put dup 8#101 /Aacute put dup 8#102 /Acircumflex put dup 8#103 /Adieresis put dup 8#104 /Agrave put dup 8#105 /Aring put dup 8#106 /Atilde put dup 8#107 /Ccedilla put dup 8#110 /Eacute put dup 8#111 /Ecircumflex put dup 8#112 /Edieresis put dup 8#113 /Egrave put dup 8#114 /Iacute put dup 8#115 /Icircumflex put dup 8#116 /Idieresis put dup 8#117 /Igrave put dup 8#120 /Ntilde put dup 8#121 /Oacute put dup 8#122 /Ocircumflex put dup 8#123 /Odieresis put dup 8#124 /Ograve put dup 8#125 /Otilde put dup 8#126 /Scaron put dup 8#127 /Uacute put dup 8#130 /Ucircumflex put dup 8#131 /Udieresis put dup 8#132 /Ugrave put dup 8#133 /Ydieresis put dup 8#134 /Zcaron put dup 8#135 /aacute put dup 8#136 /acircumflex put dup 8#137 /adieresis put dup 8#140 /agrave put dup 8#141 /aring put dup 8#142 /atilde put dup 8#143 /ccedilla put dup 8#144 /eacute put dup 8#145 /ecircumflex put dup 8#146 /edieresis put dup 8#147 /egrave put dup 8#150 /iacute put dup 8#151 /icircumflex put dup 8#152 /idieresis put dup 8#153 /igrave put dup 8#154 /ntilde put dup 8#155 /oacute put dup 8#156 /ocircumflex put dup 8#157 /odieresis put dup 8#160 /ograve put dup 8#161 /otilde put dup 8#162 /scaron put dup 8#163 /uacute put dup 8#164 /ucircumflex put dup 8#165 /udieresis put dup 8#166 /ugrave put dup 8#167 /ydieresis put dup 8#170 /zcaron put pop /Enc-dict 30 dict def Enc-dict /tmpstr1 50 string put Enc-dict /tmpstr2 50 string put Enc-dict /tmpstr3 50 string dup (Encoding-) exch cvs pop put /AEnc-def { % arguments: the original font's name, encoding nr Enc-dict begin tmpstr2 cvs /Enc-no exch def % Remember the number in a string dup /OrigName exch def % remember the name findfont 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 } forall newdict begin /Encoding tmpstr3 9 Enc-no putinterval tmpstr3 0 9 Enc-no length add getinterval cvn load def % Replace encoding currentdict /UniqueID known { /UniqueID UniqueID Enc-no cvi 49999 mul add def } if % Derive New UniqueID end % newdict /FNlength OrigName tmpstr1 cvs length def % convert name, remember length FNlength 1 add Enc-no length add string dup 0 OrigName tmpstr1 cvs putinterval dup FNlength (-) putinterval dup FNlength 1 add Enc-no putinterval dup 0 tmpstr1 0 FNlength getinterval putinterval % Add old name cvn dup newdict /FontName 3 2 roll put newdict definefont end % 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 1 BP /slant 0 def /height 0 def 480 V 10 R 720(WAIT)S 992(\()S 1034(2)S 1092(\))S 2696(Eighth)S (Edition)296 2989 A 4855(WAIT)S 5127(\()S 5169(2)S 5227(\))S 960 V 9 R 720(N)S 722(NA)S 790(AM)S 858(ME)S 940(E)S 1080 V 10 R 1080(wait,)S 1304(waitpid)S 10 R-1 1631(-)S 10 R 1713(wait)S 1912(for)S 2055(process)S 2382(to)S 2485(terminate)S 1248 V 9 R 720(S)S 722(SY)S 774(YN)S 842(NO)S 910(OP)S 978(PS)S 1030(SI)S 1082(IS)S 1115(S)S 1368 V 10 B 1080(#include)S 1482()S 1488 V 1080(#include)S 1482()S 1728 V 1080(pid_t)S 1342(wait\(int)S 1717(*)S 10 I 1767(status)S 10 B 2001(\))S 1848 V 1080(pid_t)S 1342(waitpid\(pid_t)S 10 I 1963(pid)S 10 B 2091(,)S 2154(int)S 2310(*)S 10 I 2360(status)S 10 B 2594(,)S 2657(int)S 10 I 2813(options)S 10 B 3108(\))S 2016 V 9 R 720(D)S 722(DE)S 790(ES)S 848(SC)S 900(CR)S 962(RI)S 1024(IP)S 1057(PT)S 1109(TI)S 1167(IO)S 1200(ON)S 1268(N)S 2136 V 10 B 1080(Wait)S 10 R 1320(causes)S 1611(its)S 1734(caller)S 1987(to)S 2093(delay)S (until)184 2339 A 2551(a)S 2624(signal)S 2892(is)S (received)342 2987 A 3357(or)S 3469(one)S 3642(of)S 3754(its)S 3877(child)S 4106(processes)S 4520(terminates.)S 5019(If)S 5116(any)S 2256 V 1080(child)S 1309(has)S 1471(died)S 1672(since)S 1907(the)S 2058(last)S 10 B 2226(wait)S 10 R 2411(,)S 2464(return)S 2733(is)S 2828(immediate,)S 3306(returning)S 3703(the)S 3854(process)S 4183(id)S 4288(and)S 4460(exit)S 4638(status)S 4894(of)S 5005(one)S 5177(of)S 2376 V 1080(the)S 1228(terminated)S 1684(children.)S 2089(If)S 2182(there)S 2409(are)S 2558(no)S 2683(children,)S 3063(return)S 3329(is)S 3421(immediate)S 3871(with)S 4075(the)S 4223(value)S 10 R-1 4466(-)S 10 R 4523(1)S 4598(returned.)S 2544 V 1080(On)S 1236(return)S 1510(from)S 1740(a)S (successful)414 1819 A 10 B 2267(wait)S 10 R 2486(call,)S 10 I 2691(status)S 10 R 2959(is)S (nonzero,)349 3060 A 3443(and)S 3622(the)S 3779(high)S 3991(byte)S 4198(of)S 10 I 4316(status)S 10 R 4584(contains)S 4953(the)S 5110(low)S 2664 V 1080(byte)S 1283(of)S 1397(the)S 1550(argument)S 1960(to)S 10 B 2068(exit)S 10 R (supplied)340 2254 A 2623(by)S 2752(the)S 2904(child)S 3134(process;)S 3493(the)S 3645(low)S 3825(byte)S 4027(of)S 10 I 4140(status)S 10 R 4403(contains)S 4767(the)S 4919(termina-)S 2784 V 1080(tion)S 1273(status)S 1539(of)S 1660(the)S 1820(process.)S 2209(A)S 2319(more)S 2563(precise)S (de\256nition)385 2886 A 3308(of)S 3429(the)S 10 I 3589(status)S 10 R 3860(word)S 4104(is)S 4208(given)S 4468(in)S 4584(<)S 10 I 4641(sys/wait.h)S 10 R 5048(>.)S 5193(If)S 2904 V 10 B 1080(wait)S 10 R 1290(can)S 1455(called)S 1721(with)S 1925(a)S 1995(null)S 2176(pointer)S 2486(argument)S 2891(to)S 2994(indicate)S 3338(that)S 3514(no)S 3639(status)S 3893(need)S 4108(be)S 4228(returned.)S 3072 V 10 B 1080(Waitpid)S 10 R 1461(provides)S 1836(an)S 1960(alternate)S (interface)354 2337 A 2720(for)S 2867(programs)S 3276(that)S 3456(must)S 3680(not)S 3837(block)S 4090(when)S 4338(collecting)S 4765(the)S 4918(status)S 5177(of)S 3192 V 1080(child)S 1308(processes,)S 1746(or)S 1856(that)S 2033(wish)S 2249(to)S 2353(wait)S 2553(for)S 2697(one)S 2868(particular)S 3281(child.)S 3558(The)S 3741(pid)S 3895(parameter)S 4325(is)S 4418(the)S 4567(process)S 4895(ID)S 5028(of)S 5138(the)S 3312 V 1080(child)S 1309(to)S 1415(wait)S 1617(for,)S 10 R-1 1788(-)S 10 R 1845(1)S 1923(for)S 2069(any)S 2242(child.)S 2521(The)S 10 I 2706(status)S 10 R 2968(parameter)S 3400(is)S 3495(de\256ned)S 3819(as)S (above.)265 3932 A 4251(The)S 10 I 4437(options)S 10 R 4761(parameter)S 5194(is)S 3432 V 1080(used)S 1320(to)S 1454(indicate)S 1829(the)S 2008(call)S (should)267 2210 A 2533(not)S 2717(block)S 2996(if)S 3114(there)S 3372(are)S 3552(no)S 3708(processes)S 4150(that)S 4357(wish)S 4603(to)S 4736(report)S 5032(status)S 3552 V (\(WNOHANG\),)626 1080 A 1759(and/or)S 2069(that)S 2273(children)S 2656(of)S 2793(the)S 2969(current)S 3308(process)S 3663(that)S 3868(are)S (stopped)312 4046 A 4412(due)S 4611(to)S 4743(a)S 4842(SIGTTIN,)S 3672 V 1080(SIGTTOU,)S 1580(SIGTSTP,)S 2046(or)S 2172(SIGSTOP)S 2624(signal)S (should)267 2906 A 3215(also)S 3419(have)S 3650(their)S 3876(status)S 4146(reported)S 4523(\(WUNTRACED\).)S 3792 V 1080(\(Job)S 1278(control)S 1588(is)S 1680(not)S 1833(implemented)S 2383(for)S 2526(Minix,)S 2821(but)S 2974(these)S 3206(symbold)S 3576(and)S 3746(signals)S 4050(are.\))S 3960 V 1080(When)S 1353(the)S (WNOHANG)533 1509 A 2075(option)S 2364(is)S 2464(speci\256ed)S 2855(and)S 3033(no)S 3166(processes)S 3585(wish)S 3808(to)S 3919(report)S 4193(status,)S 10 B 4481(waitpid)S 10 R 4840(returns)S 10 R-1 5154(-)S 10 R 5211(1)S 4080 V 1080(with)S 10 B (errno)241 1304 A 10 R 1590(set)S 1747(to)S 10 B 1870(EAGAIN)S 10 R 2273(.)S 2368(The)S (WNOHANG)533 2570 A 3148(and)S 3337(WUNTRACED)S 4026(options)S 4365(may)S 4582(be)S 4721(combined)S 5161(by)S 4200 V 10 I 1080(or)S 10 R 1177('ing)S 1364(the)S 1512(two)S 1688(values.)S 4368 V 9 R 720(N)S 722(NO)S 790(OT)S 858(TE)S 916(ES)S 974(S)S 4488 V 10 R 1080(The)S 1262(call)S 10 B 1433(wait\(&)S 10 I 1736(status)S 10 B 1978(\))S 10 R 2037(is)S 2129(equivalent)S 2573(to)S 10 B 2676(waitpid\()S 10 B-1 3035(-)S 10 B 3092(1,)S 3192(&)S 10 I 3276(status)S 10 B 3518(,)S 3568(0\))S 10 R 3652(.)S 4656 V 1080(See)S 10 B 1262(sigaction)S 10 R 1642(\(2\))S 1796(for)S 1950(a)S 2031(list)S 2190(of)S 2310(termination)S 2810(statuses)S 3159(\(signals\);)S 3570(0)S 3656(status)S 3921(indicates)S 4315(normal)S 4637(termination.)S 5188(A)S 4776 V 1080(special)S 1390(status)S (\(0177\))268 1649 A 1946(is)S 2042(returned)S 2407(for)S 2554(a)S (stopped)312 2628 A 2969(process)S 3300(that)S 3480(has)S 3643(not)S 3800(terminated)S 4260(and)S 4434(can)S 4603(be)S 4727(restarted;)S 5132(see)S 4896 V 10 B 1080(ptrace)S 10 R 1355(\(2\).)S 1551(If)S 1647(the)S (0200)200 1798 A 2026(bit)S 2160(of)S 2272(the)S 2423(termination)S 2915(status)S 3172(is)S 3267(set,)S 3432(a)S 3505(core)S 3707(image)S 3981(of)S 4093(the)S 4244(process)S 4574(was)S (produced)374 4759 A 5161(by)S 5016 V 1080(the)S 1228(system.)S 5184 V 1080(If)S 1176(the)S 1327(parent)S 1607(process)S 1937(terminates)S (without)307 2385 A (waiting)302 2720 A 3050(on)S 3178(its)S 3301(children,)S 3684(the)S (initialization)509 3835 A 4372(process)S 4703(\(process)S 5068(ID)S 5204(=)S 5304 V 1080(1\))S 1189(inherits)S 1516(the)S 1664(children.)S 5472 V 10 I 1080()S 10 R 1640(de\256nes)S 1950(a)S 2020(number)S 2352(of)S 2461(macros)S 2777(that)S 2953(operate)S 3275(on)S 3400(a)S 3470(status)S 3724(word:)S 5640 V 10 B 1080(WIFEXITED\()S 10 I 1701(status)S 10 B 1943(\))S 5760 V 10 R 1330(True)S 1546(if)S 1633(normal)S 1943(exit.)S 5928 V 10 B 1080(WEXITSTATUS\()S 10 I 1852(status)S 10 B 2094(\))S 6048 V 10 R 1330(Exit)S 1523(status)S 1777(if)S 1864(the)S 2012(process)S 2339(returned)S 2700(by)S 2825(a)S 2895(normal)S 3205(exit,)S 3406(zero)S 3605(otherwise.)S 6216 V 10 B 1080(WTERMSIG\()S 10 I 1689(status)S 10 B 1931(\))S 6336 V 10 R 1330(Signal)S 1612(number)S 1944(if)S 2031(the)S 2179(process)S 2506(died)S 2704(by)S 2829(a)S 2899(signal,)S 3189(zero)S 3388(otherwise.)S 6504 V 10 B 1080(WIFSIGNALED\()S 10 I 1841(status)S 10 B 2083(\))S 6624 V 10 R 1330(True)S 1546(if)S 1633(the)S 1781(process)S 2108(died)S 2306(by)S 2431(a)S 2501(signal.)S 6792 V 10 B 1080(WIFSTOPPED\()S 10 I 1780(status)S 10 B 2022(\))S 6912 V 10 R 1330(True)S 1546(if)S 1633(the)S 1781(process)S 2108(is)S (stopped.)337 2200 A 2587(\(Never)S 2893(true)S (under)229 3075 A 3329(Minix.\))S 7080 V 10 B 1080(WSTOPSIG\()S 10 I 1650(status)S 10 B 1892(\))S 7200 V 10 R 1330(Signal)S 1612(number)S 1944(of)S 2053(the)S 2201(signal)S 2466(that)S (stopped)312 2642 A 2979(the)S 3127(process.)S 7368 V 9 R 720(R)S 722(RE)S 784(ET)S 842(TU)S 900(UR)S 968(RN)S 1030(N)S 1121(V)S 1123(VA)S 1191(AL)S 1259(LU)S 1317(UE)S 1385(E)S 7488 V 10 R 1080(If)S 10 B 1179(wait)S 10 R 1395(returns)S 1706(due)S 1882(to)S 1992(a)S (stopped)312 2069 A 2413(or)S 2529(terminated)S 2992(child)S 3225(process,)S 3584(the)S 3739(process)S 4073(ID)S 4212(of)S 4328(the)S 4483(child)S 4716(is)S 4815(returned)S 5183(to)S 7903 V 720(Page)S 941(1)S 2669(\()S 2711(June)S 2920(30,)S (1985)200 3070 A 3278(\))S 4455(September)S 4911(13,)S (1996)200 5061 A 8143 V EP %%Page: 2 2 BP /slant 0 def /height 0 def 480 V 10 R 720(WAIT)S 992(\()S 1034(2)S 1092(\))S 2696(Eighth)S (Edition)296 2989 A 4855(WAIT)S 5127(\()S 5169(2)S 5227(\))S 960 V 1080(the)S (calling)274 1228 A 1527(process.)S 1904(Otherwise,)S 2369(a)S 2439(value)S 2682(of)S 10 R-1 2791(-)S 10 R 2848(1)S 2923(is)S 3015(returned)S 3376(and)S 10 B (errno)241 3546 A 10 R 3812(is)S 3904(set)S 4041(to)S 4144(indicate)S 4488(the)S 4636(error.)S 1128 V 10 B 1080(Waitpid)S 10 R 1457(returns)S 10 R-1 1762(-)S 10 R 1819(1)S 1894(if)S 1981(there)S 2208(are)S 2357(no)S 2482(children)S 2837(not)S 2990(previously)S 3439(waited)S 3733(for,)S 3901(if)S 3988(the)S 4136(process)S 4463(that)S 4640(it)S 4722(wants)S 4983(to)S 5087(wait)S 1248 V 1080(for)S 1223(doesn't)S 1544(exist,)S 1784(or)S 1893(if)S (WNOHANG)533 1980 A 2538(is)S 2630(speci\256ed)S 3013(and)S 3183(there)S 3410(are)S 3559(no)S (stopped)312 3684 A 4021(or)S 4130(exited)S 4401(children.)S 1416 V 9 R 720(E)S 722(ER)S 780(RR)S 842(RO)S 904(OR)S 972(RS)S 1034(S)S 1536 V 10 B 1080(Wait)S 10 R (will)157 1317 A 1499(fail)S 1659(and)S 1829(return)S 2095(immediately)S 2623(if)S 2710(one)S 2880(or)S 2989(more)S 3221(of)S 3330(the)S 3478(following)S 3894(are)S 4043(true:)S 1704 V 1080([ECHILD])S 1830(The)S (calling)274 2012 A 2311(process)S 2638(has)S 2797(no)S 2922(existing)S 3265(unwaited-for)S 3811(child)S 4037(processes.)S 1872 V 1080([EFAULT])S 1830(The)S 10 I 2012(status)S 10 R 2271(argument)S 2676(points)S 2946(to)S 3049(an)S (illegal)252 3169 A 3446(address.)S 2040 V ([EAGAIN])456 1080 A 10 B 1830(Waitpid)S 10 R 2207(is)S 2299(called)S 2565(with)S 2769(the)S (WNOHANG)533 2917 A 3475(option)S 3756(and)S 3926(no)S 4051(child)S 4277(has)S 4436(exited)S 4707(yet.)S 2208 V 9 R 720(S)S 722(SE)S 774(EE)S 832(E)S 913(A)S 915(AL)S 983(LS)S 1041(SO)S 1093(O)S 2328 V 10 B 1080(execve)S 10 R 1360(\(2\),)S 10 B 1528(exit)S 10 R 1685(\(2\),)S 10 B 1853(sigaction)S 10 R 2233(\(2\).)S 7903 V 720(September)S 1176(13,)S (1996)200 1326 A 2669(\()S 2711(June)S 2920(30,)S (1985)200 3070 A 3278(\))S 4990(Page)S 5211(2)S 8143 V EP %%Trailer %%DocumentFonts: Times-Roman Times-Bold Times-Italic %%Pages: 2