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

📄 open.2

📁 操作系统设计与实现源码
💻 2
📖 第 1 页 / 共 2 页
字号:
2042(\256le)S2203(already)S2532(exists,)S2818(the)S2973(open)S3200(returns)S3512(an)S3639(error.)S3918(This)S4129(can)S4301(be)S4428(used)S4644(to)S4754(implement)S5216(a)S4200 V1080(simple)S1374(exclusive)S(access)258 1780 A2064(locking)S2391(mechanism.)S2925(If)S3018(O_EXCL)S3430(is)S3522(set)S3659(and)S3829(the)S3977(last)S(component)446 4142 A4613(of)S4722(the)S4870(pathname)S4320 V1080(is)S1183(a)S1264(symbolic)S1668(link,)S1885(the)S2044(open)S(will)157 2275 A2468(fail)S2639(even)S2865(if)S2963(the)S3122(symbolic)S3526(link)S3718(points)S3999(to)S4113(a)S(non-existent)497 4194 A4728(name.)S5033(If)S5138(the)S4440 V(O_NONBLOCK)684 1080 A1793(\257ag)S1973(is)S2069(speci\256ed)S2456(and)S2630(the)S2782(open)S3006(call)S3181(would)S3461(result)S3714(in)S3821(the)S3973(process)S4304(being)S4556(blocked)S4903(for)S5049(some)S4560 V1080(reason,)S1393(the)S1541(open)S1761(returns)S2066(immediately.)S4728 V(Upon)223 1080 A(successful)414 1328 A1767(completion)S2244(a)S(non-negative)525 2315 A2866(integer)S3172(termed)S3478(a)S3549(\256le)S3704(descriptor)S4133(is)S4226(returned.)S4638(The)S4821(\256le)S4976(pointer)S4848 V1080(used)S1289(to)S1392(mark)S1624(the)S1772(current)S(position)323 2083 A2431(within)S2713(the)S2861(\256le)S3015(is)S3107(set)S3244(to)S3347(the)S3495(beginning)S3921(of)S4030(the)S4178(\256le.)S5016 V1080(The)S1262(new)S1455(descriptor)S1883(is)S1975(set)S2112(to)S2215(remain)S2520(open)S2740(across)S10 B3017(execve)S10 R3322(system)S3626(calls;)S3864(see)S10 B4018(close)S10 R4225(\(2\).)S5184 V1080(The)S1262(system)S1566(imposes)S1920(a)S1990(limit)S2205(on)S2330(the)S2478(number)S2810(of)S2919(descriptors)S3386(open)S3606(simultaneously)S4239(by)S4364(one)S4534(process.)S5352 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S5472 V10 R1080(The)S1262(named)S1555(\256le)S1709(is)S1801(opened)S2116(unless)S2392(one)S2562(or)S2671(more)S2903(of)S3012(the)S3160(following)S3576(are)S3725(true:)S5640 V1080([ENOTDIR])S1830(A)S(component)446 1928 A2399(of)S2508(the)S2656(path)S2854(pre\256x)S3114(is)S3206(not)S3359(a)S3429(directory.)S5808 V([ENAMETOOLONG])916 1080 A5928 V1830(The)S2012(path)S2210(name)S(exceeds)319 2453 A2797(PATH_MAX)S3371(characters.)S6096 V1080([ENOENT])S1830(O_CREAT)S2309(is)S2401(not)S2554(set)S2691(and)S2861(the)S3009(named)S3302(\256le)S3456(does)S3665(not)S3818(exist.)S6264 V1080([ENOENT])S1830(A)S(component)446 1928 A2399(of)S2508(the)S2656(path)S2854(name)S3097(that)S3273(must)S3493(exist)S3708(does)S3917(not)S4070(exist.)S6432 V1080([EACCES])S1830(Search)S2130(permission)S2596(is)S2688(denied)S2981(for)S3124(a)S(component)446 3194 A3665(of)S3774(the)S3922(path)S4120(pre\256x.)S6600 V1080([EACCES])S1830(The)S2012(required)S2373(permissions)S2878(\(for)S3055(reading)S3382(and/or)S(writing\))325 3664 A4014(are)S4163(denied)S4456(for)S4599(the)S4747(named)S5040(\256le.)S6768 V1080([EACCES])S1830(O_CREAT)S2315(is)S2413(speci\256ed,)S2827(the)S2981(\256le)S3141(does)S3356(not)S3515(exist,)S3761(and)S3937(the)S4091(directory)S4486(in)S4595(which)S4872(it)S4959(is)S5057(to)S5166(be)S6888 V1830(created)S2147(does)S2356(not)S2509(permit)S(writing.)316 2797 A7056 V1080([EACCES])S1830(A)S1928(device)S2216(to)S2319(be)S2439(opened)S2754(for)S(writing)291 2897 A3213(is)S(physically)413 3305 A3743(write)S3976(protected.)S7224 V1080([ELOOP])S1830(Too)S2033(many)S2297(symbolic)S2706(links)S2942(were)S(encountered)492 3180 A3713(in)S3833(translating)S4300(the)S4465(pathname.)S4948(\(Minix-)S7344 V1830(vmd\))S7903 V720(Page)S941(1)S2669(\()S2711(May)S2920(14,)S(1986)200 3070 A3278(\))S4455(September)S4911(13,)S(1996)200 5061 A8143 VEP%%Page: 2 2BP/slant 0 def/height 0 def480 V10 R720(OPEN)S992(\()S1034(2)S1092(\))S2696(Eighth)S(Edition)296 2989 A4855(OPEN)S5127(\()S5169(2)S5227(\))S960 V1080([EISDIR])S1830(The)S2018(named)S2317(\256le)S2477(is)S2575(a)S2651(directory,)S3071(and)S3247(the)S3401(arguments)S3851(specify)S4173(it)S4260(is)S4358(to)S4467(be)S4593(opened)S4914(for)S5064(writ-)S1080 V1830(ing.)S1248 V1080([EROFS])S1830(The)S2012(named)S2305(\256le)S2459(resides)S2764(on)S2889(a)S2959(read-only)S3370(\256le)S3524(system,)S3853(and)S4023(the)S4171(\256le)S4325(is)S4417(to)S4520(be)S4640(modi\256ed.)S1416 V1080([EMFILE])S1830(The)S2012(system)S2316(limit)S2531(for)S2674(open)S2894(\256le)S3048(descriptors)S3515(per)S3669(process)S3996(has)S4155(already)S4477(been)S(reached.)339 4692 A1584 V1080([ENFILE])S1830(The)S2012(system)S2316(\256le)S2470(table)S2691(is)S2783(full.)S1752 V1080([ENXIO])S1830(The)S2017(named)S2315(\256le)S2474(is)S2571(a)S2646(character)S3047(special)S3358(or)S3473(block)S3727(special)S4038(\256le,)S4223(and)S4399(the)S4553(device)S4847(associated)S1872 V1830(with)S2034(this)S2204(special)S2509(\256le)S2663(does)S2872(not)S3025(exist.)S2040 V1080([ENOSPC])S1830(O_CREAT)S2317(is)S2417(speci\256ed,)S2833(the)S2989(\256le)S3151(does)S3368(not)S3529(exist,)S3777(and)S3955(the)S4111(directory)S4508(in)S4619(which)S4898(the)S5054(entry)S2160 V1830(for)S1978(the)S2131(new)S2329(\256le)S2487(is)S2583(being)S(placed)263 2835 A(cannot)268 3127 A3424(be)S3548(extended)S(because)319 3940 A4288(there)S4519(is)S4615(no)S(space)224 4744 A4997(left)S5161(on)S2280 V1830(the)S1978(\256le)S2132(system)S2436(containing)S2885(the)S3033(directory.)S2448 V1080([ENOSPC])S1830(O_CREAT)S2309(is)S2401(speci\256ed,)S2809(the)S2957(\256le)S3111(does)S3320(not)S3473(exist,)S3713(and)S3883(there)S4110(are)S4259(no)S4385(free)S(inodes)262 4569 A4857(on)S4983(the)S5132(\256le)S2568 V1830(system)S2134(on)S2259(which)S2530(the)S2678(\256le)S2832(is)S2924(being)S3172(created.)S2736 V1080([EIO])S1830(An)S1988(I/O)S2158(error)S2390(occurred)S2778(while)S3037(making)S3373(the)S3531(directory)S3930(entry)S4172(or)S4292(allocating)S4725(the)S(inode)223 4884 A5143(for)S2856 V1830(O_CREAT.)S3024 V1080([EFAULT])S10 I1830(Path)S10 R2045(points)S2315(outside)S2630(the)S2778(process's)S3178(allocated)S3567(address)S(space.)249 3894 A3192 V1080([EEXIST])S1830(O_CREAT)S2309(and)S2479(O_EXCL)S2891(were)S3113(speci\256ed)S3496(and)S3666(the)S3814(\256le)S3968(exists.)S3360 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S3480 V10 B1080(chmod)S10 R1371(\(2\),)S10 B1539(close)S10 R1746(\(2\),)S10 B(dup)168 1914 A10 R2082(\(2\),)S10 B2250(fcntl)S10 R2447(\(2\),)S10 B2615(lseek)S10 R2828(\(2\),)S10 B2996(read)S10 R3192(\(2\),)S10 B3360(write)S10 R3585(\(2\),)S10 B3753(umask)S10 R4038(\(2\).)S7903 V720(September)S1176(13,)S(1996)200 1326 A2669(\()S2711(May)S2920(14,)S(1986)200 3070 A3278(\))S4990(Page)S5211(2)S8143 VEP%%Trailer%%DocumentFonts: Times-Roman Times-Bold Times-Italic%%Pages: 2

⌨️ 快捷键说明

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