📄 allman2.ps
字号:
1464(<unistd.h>)S1536 V10 B1080(char)S1314(*brk\(char)S1789(*)S10 I(addr)189 1839 A10 B2028(\))S1704 V1080(char)S1314(*sbrk\(int)S10 I1750(incr)S10 B1912(\))S1872 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)S1992 V10 B1080(Brk)S10 R1286(sets)S1475(the)S1636(system's)S2026(idea)S2232(of)S2354(the)S2515(lowest)S2816(data)S3022(segment)S3395(location)S3757(not)S3923(used)S4145(by)S4283(the)S4444(program)S4824(\(called)S5138(the)S2112 V1080(break\))S1372(to)S10 I(addr)189 1484 A10 R1681(.)S1765(Locations)S2196(greater)S2511(than)S10 I(addr)189 2718 A10 R2941(and)S3120(below)S3400(the)S3557(stack)S3798(pointer)S4117(are)S4274(not)S4435(in)S4546(the)S4702(address)S(space)224 5037 A2232 V1080(and)S(will)157 1250 A1432(thus)S1624(cause)S1873(a)S1943(memory)S2303(violation)S2685(if)S(accessed.)378 2772 A2400 V1080(In)S1195(the)S1349(alternate)S1728(function)S10 B2094(sbrk)S10 R2290(,)S10 I2346(incr)S10 R2539(more)S2777(bytes)S3020(are)S3175(added)S3446(to)S3555(the)S3710(program's)S4156(data)S(space)224 4356 A4612(and)S4789(a)S4866(pointer)S5183(to)S2520 V1080(the)S1228(start)S1427(of)S1536(the)S1684(new)S1877(area)S2071(is)S2163(returned.)S2688 V1080(When)S1346(a)S1417(program)S1784(begins)S2072(execution)S2489(via)S10 B2638(execve)S10 R2944(the)S3093(break)S3343(is)S3436(set)S3575(at)S3675(the)S3825(highest)S4142(location)S4493(de\256ned)S4816(by)S4943(the)S5093(pro-)S2808 V1080(gram)S1316(and)S1490(data)S1687(storage)S2007(areas.)S2294(Ordinarily,)S2768(therefore,)S3187(only)S3393(programs)S3801(with)S4008(growing)S4371(data)S4567(areas)S4803(need)S5021(to)S5127(use)S2928 V10 B1080(sbrk)S10 R1276(.)S3096 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)S3216 V10 R1080(The)S1272(address)S1609(of)S1729(the)S1888(new)S2092(break)S2352(is)S2455(returned)S2827(if)S10 B2925(brk)S10 R(succeeds;)386 3118 A10 B-13540(-)S10 B3597(1)S10 R3683(if)S3781(the)S3940(program)S4317(requests)S4683(more)S4926(memory)S3336 V1080(than)S1278(the)S1426(system)S1730(limit.)S10 B1995(Sbrk)S10 R2233(returns)S10 B-12538(-)S10 B2595(1)S10 R2670(if)S2757(the)S2905(break)S3154(could)S3402(not)S3555(be)S3675(set.)S3504 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S3624 V10 B1080(Sbrk)S10 R(will)157 1318 A1500(fail)S1660(and)S1830(no)S(additional)402 1955 A2382(memory)S(will)157 2742 A2924(be)S3044(allocated)S3433(if)S3520(one)S3690(of)S3799(the)S3947(following)S4363(are)S4512(true:)S3792 V1080([ENOMEM])S1830(The)S2012(maximum)S2444(possible)S2798(size)S2980(of)S3089(a)S3159(data)S3352(segment)S3712(\(as)S3855(set)S3992(by)S10 B4117(chmem)S10 R4431(\(1\)\))S4608(was)S(exceeded.)400 4790 A3960 V1080([ENOMEM])S1830(Insuf\256cient)S2314(virtual)S2602(memory)S(space)224 2962 A3211(existed)S3521(to)S(support)301 3624 A3950(the)S4098(expansion.)S4580(\(Minix-vmd\))S4128 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S4248 V10 B1080(chmem)S10 R1394(\(1\),)S10 B1562(execve)S10 R1842(\(2\),)S10 B2010(malloc)S10 R2295(\(3\),)S10 B2463(end)S10 R2620(\(3\).)S4416 V9 R720(N)S722(NO)S790(OT)S858(TE)S916(ES)S974(S)S4536 V10 R1080(Minix-vmd)S(rounds)273 1562 A1860(a)S1930(small)S2173(data)S2366(segment)S2726(limit)S2941(up)S3066(to)S3169(3)S3244(megabytes.)S4704 V9 R720(B)S722(BU)S784(UG)S852(GS)S920(S)S4824 V10 R(Setting)285 1080 A1391(the)S1540(break)S1790(may)S1989(fail)S2150(due)S2321(to)S2425(a)S2496(temporary)S2936(lack)S3130(of)S3241(virtual)S3531(memory)S(under)229 3893 A4149(Minix-vmd.)S4683(It)S4772(is)S4866(not)S5021(possi-)S4944 V1080(ble)S1228(to)S(distinguish)440 1331 A1796(this)S1966(from)S2187(a)S2257(failure)S2546(caused)S2845(by)S(exceeding)408 2970 A3403(the)S3551(maximum)S3983(size)S4165(of)S4274(the)S4422(data)S4615(segment.)S7903 V720(Page)S941(1)S2616(\()S(August)290 2658 A2973(26,)S(1985)200 3123 A3331(\))S4455(September)S4911(17,)S(1996)200 5061 A8143 VEP%%Page: 1 4BP/slant 0 def/height 0 def480 V10 R720(CHDIR)S1042(\()S1084(2)S1142(\))S2696(Eighth)S(Edition)296 2989 A4805(CHDIR)S5127(\()S5169(2)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(chdir)S10 R-11312(-)S10 R1394(change)S1704(current)S2015(working)S2375(directory)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(chdir\(const)S1762(char)S1996(*)S10 I2046(path)S10 B2224(\))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 I1080(Path)S10 R1299(is)S1395(the)S1547(pathname)S1967(of)S2080(a)S2154(directory.)S10 B2597(Chdir)S10 R2884(causes)S3176(this)S3350(directory)S3743(to)S3850(become)S4192(the)S4344(current)S4660(working)S5025(direc-)S2016 V1080(tory,)S1292(the)S1440(starting)S1767(point)S1998(for)S2141(path)S2339(names)S2621(not)S2774(beginning)S3200(with)S3404(``/''.)S2184 V1080(In)S1191(order)S1431(for)S1576(a)S1648(directory)S2039(to)S2144(become)S2484(the)S2634(current)S2947(directory,)S3363(a)S3436(process)S3766(must)S3989(have)S4207(execute)S4543(\(search\))S(access)258 4897 A5183(to)S2304 V1080(the)S1228(directory.)S2472 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)S2592 V10 R(Upon)223 1080 A(successful)414 1328 A1768(completion,)S2271(a)S2342(value)S2586(of)S2696(0)S2772(is)S2865(returned.)S3277(Otherwise,)S3743(a)S3814(value)S4058(of)S10 R-14168(-)S10 R4225(1)S4301(is)S4394(returned)S4756(and)S10 B(errno)241 4927 A10 R5194(is)S2712 V1080(set)S1217(to)S1320(indicate)S1664(the)S1812(error.)S2880 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S3000 V10 B1080(Chdir)S10 R(will)157 1364 A1547(fail)S1708(and)S1879(the)S2028(current)S2340(working)S2701(directory)S(will)157 3091 A3274(be)S3395(unchanged)S3856(if)S3944(one)S4115(or)S4225(more)S4458(of)S4569(the)S4719(following)S5137(are)S3120 V1080(true:)S3288 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.)S3456 V([ENAMETOOLONG])916 1080 A3576 V1830(The)S2012(path)S2210(name)S(exceeds)319 2453 A2797(PATH_MAX)S3371(characters.)S3744 V1080([ENOENT])S1830(The)S2012(named)S2305(directory)S2694(does)S2903(not)S3056(exist.)S3912 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-)S4032 V1830(vmd\))S4200 V1080([EACCES])S1830(Search)S2130(permission)S2596(is)S2688(denied)S2981(for)S3124(any)S(component)446 3294 A3765(of)S3874(the)S4022(path)S4220(name.)S4368 V1080([EFAULT])S10 I1830(Path)S10 R2045(points)S2315(outside)S2630(the)S2778(process's)S3178(allocated)S3567(address)S(space.)249 3894 A4536 V1080([EIO])S1830(An)S1978(I/O)S2138(error)S2360(occurred)S2738(while)S2987(reading)S3314(from)S3535(or)S(writing)291 3644 A3960(to)S4063(the)S4211(\256le)S4365(system.)S4704 V9 R720(S)S722(SE)S774(EE)S832(E)S913(A)S915(AL)S983(LS)S1041(SO)S1093(O)S4824 V10 B1080(chroot)S10 R1360(\(2\).)S7903 V720(Page)S941(1)S2669(\()S2711(May)S2920(13,)S(1986)200 3070 A3278(\))S4455(September)S4911(17,)S(1996)200 5061 A8143 VEP%%Page: 1 5BP/slant 0 def/height 0 def480 V10 R720(CHMOD)S1103(\()S1145(2)S1203(\))S2696(Eighth)S(Edition)296 2989 A4744(CHMOD)S5127(\()S5169(2)S5227(\))S960 V9 R720(N)S722(NA)S790(AM)S858(ME)S940(E)S1080 V10 R1080(chmod)S10 R-11378(-)S10 R1460(change)S1770(mode)S2018(of)S2127(\256le)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(<sys/types.h>)S1488 V1080(#include)S1482(<sys/stat.h>)S1728 V1080(int)S1236(chmod\(const)S1823(char)S2057(*)S10 I2107(path)S10 B2285(,)S2348(mode_t)S10 I2705(mode)S10 B2923(\))S1896 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 R1080(The)S1264(\256le)S1420(whose)S1704(name)S1949(is)S2043(given)S2293(by)S10 I2420(path)S10 R2625(has)S2786(its)S2908(mode)S3158(changed)S3520(to)S10 I3625(mode)S10 R3851(.)S3929(Modes)S4230(are)S4382(constructed)S4874(by)S10 I5002(or)S10 R5099('ing)S2136 V1080(together)S1435(some)S1672(combination)S2199(of)S2308(the)S2456(following,)S2897(de\256ned)S3218(in)S10 I3321(<sys/stat.h>)S10 R3836(:)S2304 V1440(S_ISUID)S(04000)250 1866 A2191(set)S2328(user)S2521(ID)S2653(on)S2778(execution)S2424 V1440(S_ISGID)S(02000)250 1866 A2191(set)S(group)234 2328 A2587(ID)S2719(on)S2844(execution)S2544 V1440(S_ISVTX)S(01000)250 1866 A2191(`sticky)S2490(bit')S2655(\(see)S2843(below\))S2664 V1440(S_IRWXU)S(00700read,)449 2191 A2665(write,)S2923(execute)S3256(by)S3381(owner)S2784 V1440(S_IRUSR)S(00400)250 1866 A2191(read)S2390(by)S2515(owner)S2904 V1440(S_IWUSR)S(00200write)458 2191 A2674(by)S2799(owner)S3024 V1440(S_IXUSR)S(00100)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S3514(owner)S3144 V1440(S_IRWXG)S(00070read,)449 2191 A2665(write,)S2923(execute)S3256(by)S(group)234 3381 A3264 V1440(S_IRGRP)S(00040)250 1866 A2191(read)S2390(by)S(group)234 2515 A3384 V1440(S_IWGRP)S(00020write)458 2191 A2674(by)S(group)234 2799 A3504 V1440(S_IXGRP)S(00010)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S(group)234 3514 A3624 V1440(S_IRWXO)S(00007read,)449 2191 A2665(write,)S2923(execute)S3256(by)S3381(others)S3744 V1440(S_IROTH)S(00004)250 1866 A2191(read)S2390(by)S2515(others)S3864 V1440(S_IWOTH)S(00002write)458 2191 A2674(by)S2799(others)S3984 V1440(S_IXOTH)S(00001)250 1866 A2191(execute)S2524(\(search)S2841(on)S2966(directory\))S3389(by)S3514(others)S4152 V1080(If)S1180(mode)S1435(ISVTX)S1765(\(the)S1954(`sticky)S2260(bit'\))S2466(is)S2565(set)S2709(on)S2841(a)S2918(directory,)S3339(an)S(unprivileged)508 3466 A4006(user)S4206(may)S4412(not)S4573(delete)S4847(or)S4964(rename)S4272 V1080(\256les)S1273(of)S1382(other)S1614(users)S1846(in)S1949(that)S2125(directory.)S2564(\(Minix-vmd\))S4440 V1080(Only)S1306(the)S1454(owner)S1731(of)S1840(a)S1910(\256le)S2064(\(or)S2207(the)S2355(super-user\))S2834(may)S3032(change)S3342(the)S3490(mode.)S4608 V(Writing)313 1080 A1422(or)S1535(changing)S1932(the)S2084(owner)S2365(of)S2478(a)S2552(\256le)S2710(turns)S2940(off)S3087(the)S3239(set-user-id)S3694(and)S(set-group-id)492 3868 A4389(bits)S4563(unless)S4843(the)S4996(user)S5194(is)S4728 V1080(the)S1235(super-user.)S1737(This)S1948(makes)S2237(the)S2392(system)S2703(somewhat)S3143(more)S3382(secure)S3672(by)S3804(protecting)S4244(set-user-id)S(\(set-group-id\))560 4701 A4848 V1080(\256les)S1277(from)S1502(remaining)S1939(set-user-id)S(\(set-group-id\))560 2394 A2983(if)S3074(they)S3276(are)S3430(modi\256ed,)S3842(at)S3945(the)S4098(expense)S4452(of)S4566(a)S4641(degree)S4940(of)S5054(com-)S4968 V(patibility.)388 1080 A5136 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)S5256 V10 R(Upon)223 1080 A(successful)414 1328 A1768(completion,)S2271(a)S2342(value)S2586(of)S2696(0)S2772(is)S2865(returned.)S3277(Otherwise,)S3743(a)S3814(value)S4058(of)S10 R-14168(-)S10 R4225(1)S4301(is)S4394(returned)S4756(and)S10 B(errno)241 4927 A10 R5194(is)S5376 V1080(set)S1217(to)S1320(indicate)S1664(the)S1812(error.)S5544 V9 R720(E)S722(ER)S780(RR)S842(RO)S904(OR)S972(RS)S1034(S)S5664 V10 B1080(Chmod)S
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -