⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 init.8

📁 操作系统设计与实现源码
💻 8
📖 第 1 页 / 共 2 页
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 14:23:49 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/R{/Times-Roman FF}def/B{/Times-Bold FF}def/C{/Courier FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(INIT)S931(\()S973(8)S1031(\))S2696(Eighth)S(Edition)296 2989 A4916(INIT)S5127(\()S5169(8)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(init)S10 R-11239(-)S10 R(grandparent)481 1321 A1827(of)S1936(all)S2062(processes)S1248 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)S1368 V10 R1080(The)S1270(\256rst)S1460(program)S1834(started)S2136(by)S2269(Minix)S2547(is)S10 B2647(init)S10 R2793(.)S2876(The)S3066(actions)S3385(performed)S3839(by)S10 B3973(init)S10 R4153(can)S4327(be)S4456(summarized)S4982(by)S5116(this)S1488 V(pseudo)284 1080 A1389(shell)S1604(program:)S1728 V10 C1440(#)S(Open)244 1562 A1867(0,)S2050(1,)S2233(2.)S1848 V(exec)244 1440 A(</dev/null)610 1745 A(>/dev/log)549 2416 A(2>&1)244 3026 A2088 V1440(#)S(Run)183 1562 A(the)183 1806 A(system)366 2050 A(initialization)854 2477 A(script.)427 3392 A2208 V1440(sh)S(/etc/rc)427 1623 A($bootopts)549 2111 A2448 V(>/etc/utmp)610 1440 A2568 V(echo)244 1440 A(reboot)366 1745 A(>>/usr/adm/wtmp)915 2172 A2808 V(while)305 1440 A1806(:;)S1989(do)S2928 V1800(#)S(Wait)244 1922 A(for)183 2227 A2471(a)S(process)427 2593 A3081(to)S(exit,)305 3264 A(but)183 3630 A(don't)305 3874 A(always)366 4240 A(block.)366 4667 A3048 V(wait)244 1800 A3288 V1800(#)S(Record)366 1922 A(logout.)427 2349 A(\(Not)244 2898 A3203(in)S(this)244 3386 A(dumb)244 3691 A(way,)244 3996 A4301(of)S(course.\))488 4484 A3408 V1800(if)S("pid)244 1983 A2288(is)S2471(in)S2654(my)S(tables")427 2837 A($pid)244 3325 A3528 V(then)244 1800 A3648 V(echo)244 2160 A("logout)427 2465 A($pid")305 2953 A(>/etc/utmp)610 3319 A3768 V(echo)244 2160 A("logout)427 2465 A($pid")305 2953 A(>>/usr/adm/wtmp)915 3319 A3888 V1800(\256)S4128 V1800(#)S(Start)305 1922 A2288(a)S(new)183 2410 A(session.)488 2654 A4248 V(while)305 1800 A(read)244 2166 A(line)244 2471 A(type)244 2776 A(getty)305 3081 A(init)244 3447 A4368 V1800(do)S4488 V2160(if)S(idle)244 2343 A($line)305 2648 A4608 V(then)244 2160 A4728 V($init)305 2520 A(...)183 2886 A(<$tty)305 3130 A(>$tty)305 3496 A4848 V($getty)366 2520 A(<$tty)305 2947 A(>$tty)305 3313 A(2>&1)244 3679 A3984(&)S4968 V(pid=$!)366 2520 A5088 V("add)244 2520 A(pid)183 2825 A3069(to)S(tables")427 3252 A($pid)244 3740 A5208 V(echo)244 2520 A("login)366 2825 A($line)305 3252 A($pid")305 3618 A(>/etc/utmp)610 3984 A5328 V(echo)244 2520 A("login)366 2825 A($line)305 3252 A($pid")305 3618 A(>>/usr/adm/wtmp)915 3984 A5448 V2160(\256)S5568 V(done)244 1800 A2105(<)S(/dev/ttytab)671 2227 A5688 V(done)244 1440 A5928 V10 R1080(The)S1265(\256rst)S1450(action)S1724(of)S10 B1836(init)S10 R2010(is)S2105(to)S2211(run)S10 B2373(/etc/rc)S10 R2671(to)S(initialize)353 2777 A3158(the)S3309(system)S3616(as)S3728(described)S4142(in)S10 B4248(boot)S10 R4438(\(8\).)S10 B4634(Init)S10 R4819(then)S5020(enters)S6048 V1080(its)S1210(main)S(loop)178 1445 A1657(where)S1938(it)S2028(waits)S2275(for)S2427(processes)S2847(to)S2959(exit,)S

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -