📄 close.2
字号:
%!PS-Adobe-1.0%%Creator: devps (Pipeline Associates, Inc.)%%CreationDate: Fri Sep 13 13:05:37 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/I{/Times-Italic FF}def%%EndProlog%%Page: 1 1BP/slant 0 def/height 0 def480 V10 R720(CLOSE)S1048(\()S1090(2)S1148(\))S2696(Eighth)S(Edition)296 2989 A4799(CLOSE)S5127(\()S5169(2)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(close)S10 R-11312(-)S10 R1394(delete)S1660(a)S1730(descriptor)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(<unistd.h>)S1608 V1080(int)S1236(close\(int)S10 I1633(d)S10 B1683(\))S1776 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)S1896 V10 R1080(The)S10 B1267(close)S10 R1504(call)S1680(deletes)S1990(a)S2065(descriptor)S2498(from)S2725(the)S2879(per-process)S3375(object)S3652(reference)S4060(table.)S4337(If)S4436(this)S4612(is)S4710(the)S4864(last)S5035(refer-)S2016 V1080(ence)S1299(to)S1411(the)S(underlying)435 1568 A2037(object,)S2342(then)S2549(it)S(will)157 2639 A2830(be)S(deactivated.)484 2959 A3502(For)S3676(example,)S4076(on)S4210(the)S4367(last)S4541(close)S4781(of)S4898(a)S4976(\256le)S5138(the)S2136 V1080(current)S10 I(seek)174 1397 A10 R1602(pointer)S1918(associated)S2363(with)S2573(the)S2727(\256le)S2887(is)S2985(lost;)S3189(on)S3320(the)S3474(last)S3645(close)S3884(of)S4000(a)S4077(TCP/IP)S4412(descriptor)S4847(associated)S2256 V1080(naming)S1412(information)S1918(and)S2094(queued)S2415(data)S2614(are)S2769(discarded;)S3213(on)S3343(the)S3496(last)S3666(close)S3903(of)S4017(a)S4092(\256le)S4251(holding)S4587(an)S4712(advisory)S5088(lock)S2376 V1080(the)S1228(lock)S1426(is)S1518(released)S1874(\(see)S2062(further)S10 B2362(fcntl)S10 R2559(\(2\)\).)S2544 V1080(A)S1180(close)S1414(of)S1525(all)S1653(of)S1764(a)S1836(process's)S2238(descriptors)S2707(is)S2801(automatic)S3225(on)S10 I3352(exit)S10 R3506(,)S3558(but)S3713(since)S3947(there)S4177(is)S4272(a)S4345(limit)S4563(on)S4691(the)S4842(number)S5177(of)S2664 V1080(active)S1346(descriptors)S1813(per)S1967(process,)S10 B2319(close)S10 R2551(is)S(necessary)392 2643 A3060(for)S3203(programs)S3608(that)S3784(deal)S3977(with)S4181(many)S4429(descriptors.)S2832 V1080(When)S1345(a)S1416(process)S1744(forks)S1977(\(see)S10 B2166(fork)S10 R2351(\(2\)\),)S2554(all)S2681(descriptors)S3149(for)S3293(the)S3442(new)S3636(child)S3863(process)S4191(reference)S4594(the)S4743(same)S4976(objects)S2952 V1080(as)S1191(they)S1391(did)S1546(in)S1650(the)S1799(parent)S2077(before)S2361(the)S2510(fork.)S2754(If)S2848(a)S2919(new)S3113(process)S3441(is)S3534(then)S3733(to)S3837(be)S3958(run)S4118(using)S10 B4361(execve)S10 R4641(\(2\),)S4810(the)S4959(process)S3072 V1080(would)S1365(normally)S1762(inherit)S2059(these)S2300(descriptors.)S2826(Most)S3066(of)S3185(the)S3343(descriptors)S3820(can)S3995(be)S4125(rearranged)S4592(with)S10 B(dup2)218 4806 A10 R5024(\(2\))S5177(or)S3192 V1080(deleted)S1398(with)S10 B1603(close)S10 R1836(before)S2120(the)S10 B2269(execve)S10 R2575(is)S2668(attempted,)S3116(but)S3270(if)S3358(some)S3596(of)S3706(these)S3939(descriptors)S(will)157 4407 A(still)151 4590 A4767(be)S4888(needed)S5199(if)S3312 V1080(the)S10 B1228(execve)S10 R1533(fails,)S1757(it)S1838(is)S(necessary)392 1930 A2347(to)S2451(arrange)S2780(for)S2924(them)S3151(to)S3255(be)S3376(closed)S3659(if)S3747(the)S10 B3896(execve)S10 R(succeeds.)383 4202 A4636(For)S4802(this)S4973(reason,)S3432 V1080(the)S1232(call)S(``fcntl\(d,)362 1407 A1798(F_SETFD,)S10 I(\257ags)189 2267 A10 R(\)'')102 2456 A2587(is)S2683(provided,)S3094(that)S3274(can)S3443(be)S3567(used)S3780(to)S3887(mark)S4123(a)S4197(descriptor)S4629("close)S4906(on)S5035(exec")S3552 V1080(by)S(setting)268 1205 A1498(the)S10 B1646(FD_CLOEXEC)S10 R2354(\257ag:)S3720 V1440(fcntl\(d,)S1759(F_SETFD,)S2224(fcntl\(d,)S2543(F_GETFD\))S3034(|)S3079(FD_CLOEXEC\);)S3888 V9 R720(R)S722(RE)S784(ET)S842(TU)S900(UR)S968(RN)S1030(N)S1121(V)S1123(VA)S1191(AL)S1259(LU)S1317(UE)S1385(E)S4008 V10 R(Upon)223 1080 A(successful)414 1330 A1771(completion,)S2275(a)S2347(value)S2592(of)S2703(0)S2780(is)S2874(returned.)S3287(Otherwise,)S3754(a)S3826(value)S4071(of)S10 R-14182(-)S10 R4239(1)S4316(is)S4411(returned)S4775(and)S4948(the)S5099(glo-)S4128 V1080(bal)S1228(integer)S1533(variable)S10 B(errno)241 1883 A10 R2149(is)S2241(set)S2378(to)S2481(indicate)S2825(the)S2973(error.)S4296 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S4416 V10 B1080(Close)S10 R(will)157 1340 A1522(fail)S1682(if:)S4584 V1080([EBADF])S10 I1830(D)S10 R1928(is)S2020(not)S2173(an)S2293(active)S2559(descriptor.)S4752 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S4872 V10 B1080(open)S10 R1287(\(2\),)S10 B1455(pipe)S10 R1640(\(2\),)S10 B1808(execve)S10 R2088(\(2\),)S10 B2256(fcntl)S10 R2453(\(2\).)S7903 V720(Page)S941(1)S2669(\()S2711(May)S2920(22,)S(1986)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 1
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -