home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Tools / Languages / Python 1.1 / Doc / libos.tex < prev    next >
LaTeX Document  |  1994-01-02  |  3.1 KB  |  [TEXT/R*ch]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: LaTeX Document (document/latex).

You can browse this item here: libos.tex

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file LaTeX document text default
99% file LaTeX document, ASCII text, with CR line terminators default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% siegfried fmt/281 LaTeX (Subdocument) default
100% detectItEasy Format: plain text[CR] default (weak)


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[R*ch]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 53 74 61 6e 64 61 72 |\section|{Standar|
|00000010| 64 20 4d 6f 64 75 6c 65 | 20 5c 73 65 63 74 63 6f |d Module| \sectco|
|00000020| 64 65 7b 6f 73 7d 7d 0d | 0d 5c 73 74 6d 6f 64 69 |de{os}}.|.\stmodi|
|00000030| 6e 64 65 78 7b 6f 73 7d | 0d 54 68 69 73 20 6d 6f |ndex{os}|.This mo|
|00000040| 64 75 6c 65 20 70 72 6f | 76 69 64 65 73 20 61 20 |dule pro|vides a |
|00000050| 6d 6f 72 65 20 70 6f 72 | 74 61 62 6c 65 20 77 61 |more por|table wa|
|00000060| 79 20 6f 66 20 75 73 69 | 6e 67 20 6f 70 65 72 61 |y of usi|ng opera|
|00000070| 74 69 6e 67 20 73 79 73 | 74 65 6d 0d 28 4f 53 29 |ting sys|tem.(OS)|
|00000080| 20 64 65 70 65 6e 64 65 | 6e 74 20 66 75 6e 63 74 | depende|nt funct|
|00000090| 69 6f 6e 61 6c 69 74 79 | 20 74 68 61 6e 20 69 6d |ionality| than im|
|000000a0| 70 6f 72 74 69 6e 67 20 | 61 6e 20 4f 53 20 64 65 |porting |an OS de|
|000000b0| 70 65 6e 64 65 6e 74 20 | 62 75 69 6c 74 2d 69 6e |pendent |built-in|
|000000c0| 0d 6d 6f 64 75 6c 65 20 | 6c 69 6b 65 20 5c 63 6f |.module |like \co|
|000000d0| 64 65 7b 70 6f 73 69 78 | 7d 2e 0d 0d 57 68 65 6e |de{posix|}...When|
|000000e0| 20 74 68 65 20 6f 70 74 | 69 6f 6e 61 6c 20 62 75 | the opt|ional bu|
|000000f0| 69 6c 74 2d 69 6e 20 6d | 6f 64 75 6c 65 20 5c 63 |ilt-in m|odule \c|
|00000100| 6f 64 65 7b 70 6f 73 69 | 78 7d 20 69 73 20 61 76 |ode{posi|x} is av|
|00000110| 61 69 6c 61 62 6c 65 2c | 20 74 68 69 73 0d 6d 6f |ailable,| this.mo|
|00000120| 64 75 6c 65 20 65 78 70 | 6f 72 74 73 20 74 68 65 |dule exp|orts the|
|00000130| 20 73 61 6d 65 20 66 75 | 6e 63 74 69 6f 6e 73 20 | same fu|nctions |
|00000140| 61 6e 64 20 64 61 74 61 | 20 61 73 20 5c 63 6f 64 |and data| as \cod|
|00000150| 65 7b 70 6f 73 69 78 7d | 3b 20 6f 74 68 65 72 77 |e{posix}|; otherw|
|00000160| 69 73 65 2c 0d 69 74 20 | 73 65 61 72 63 68 65 73 |ise,.it |searches|
|00000170| 20 66 6f 72 20 61 6e 20 | 4f 53 20 64 65 70 65 6e | for an |OS depen|
|00000180| 64 65 6e 74 20 62 75 69 | 6c 74 2d 69 6e 20 6d 6f |dent bui|lt-in mo|
|00000190| 64 75 6c 65 20 6c 69 6b | 65 20 5c 63 6f 64 65 7b |dule lik|e \code{|
|000001a0| 6d 61 63 7d 20 61 6e 64 | 0d 65 78 70 6f 72 74 73 |mac} and|.exports|
|000001b0| 20 74 68 65 20 73 61 6d | 65 20 66 75 6e 63 74 69 | the sam|e functi|
|000001c0| 6f 6e 73 20 61 6e 64 20 | 64 61 74 61 20 61 73 20 |ons and |data as |
|000001d0| 66 6f 75 6e 64 20 74 68 | 65 72 65 2e 20 20 54 68 |found th|ere. Th|
|000001e0| 65 20 64 65 73 69 67 6e | 20 6f 66 20 61 6c 6c 0d |e design| of all.|
|000001f0| 50 79 74 68 6f 6e 27 73 | 20 62 75 69 6c 74 2d 69 |Python's| built-i|
|00000200| 6e 20 4f 53 20 64 65 70 | 65 6e 64 65 6e 20 6d 6f |n OS dep|enden mo|
|00000210| 64 75 6c 65 73 20 69 73 | 20 73 75 63 68 20 74 68 |dules is| such th|
|00000220| 61 74 20 61 73 20 6c 6f | 6e 67 20 61 73 20 74 68 |at as lo|ng as th|
|00000230| 65 20 73 61 6d 65 0d 66 | 75 6e 63 74 69 6f 6e 61 |e same.f|unctiona|
|00000240| 6c 69 74 79 20 69 73 20 | 61 76 61 69 6c 61 62 6c |lity is |availabl|
|00000250| 65 2c 20 69 74 20 75 73 | 65 73 20 74 68 65 20 73 |e, it us|es the s|
|00000260| 61 6d 65 20 69 6e 74 65 | 72 66 61 63 65 3b 20 65 |ame inte|rface; e|
|00000270| 2e 67 2e 2c 20 74 68 65 | 0d 66 75 6e 63 74 69 6f |.g., the|.functio|
|00000280| 6e 20 5c 63 6f 64 65 7b | 6f 73 2e 73 74 61 74 28 |n \code{|os.stat(|
|00000290| 5c 76 61 72 7b 66 69 6c | 65 7d 29 7d 20 72 65 74 |\var{fil|e})} ret|
|000002a0| 75 72 6e 73 20 73 74 61 | 74 20 69 6e 66 6f 20 61 |urns sta|t info a|
|000002b0| 62 6f 75 74 20 61 20 5c | 76 61 72 7b 66 69 6c 65 |bout a \|var{file|
|000002c0| 7d 20 69 6e 20 61 0d 66 | 6f 72 6d 61 74 20 63 6f |} in a.f|ormat co|
|000002d0| 6d 70 61 74 69 62 6c 65 | 20 77 69 74 68 20 74 68 |mpatible| with th|
|000002e0| 65 20 50 4f 53 49 58 20 | 69 6e 74 65 72 66 61 63 |e POSIX |interfac|
|000002f0| 65 2e 0d 0d 45 78 74 65 | 6e 73 69 6f 6e 73 20 70 |e...Exte|nsions p|
|00000300| 65 63 75 6c 69 61 72 20 | 74 6f 20 61 20 70 61 72 |eculiar |to a par|
|00000310| 74 69 63 75 6c 61 72 20 | 4f 53 20 61 72 65 20 61 |ticular |OS are a|
|00000320| 6c 73 6f 20 61 76 61 69 | 6c 61 62 6c 65 20 74 68 |lso avai|lable th|
|00000330| 72 6f 75 67 68 20 74 68 | 65 0d 5c 63 6f 64 65 7b |rough th|e.\code{|
|00000340| 6f 73 7d 20 6d 6f 64 75 | 6c 65 2c 20 62 75 74 20 |os} modu|le, but |
|00000350| 75 73 69 6e 67 20 74 68 | 65 6d 20 69 73 20 6f 66 |using th|em is of|
|00000360| 20 63 6f 75 72 73 65 20 | 61 20 74 68 72 65 61 74 | course |a threat|
|00000370| 20 74 6f 20 70 6f 72 74 | 61 62 69 6c 69 74 79 21 | to port|ability!|
|00000380| 0d 0d 4e 6f 74 65 20 74 | 68 61 74 20 61 66 74 65 |..Note t|hat afte|
|00000390| 72 20 74 68 65 20 66 69 | 72 73 74 20 74 69 6d 65 |r the fi|rst time|
|000003a0| 20 5c 63 6f 64 65 7b 6f | 73 7d 20 69 73 20 69 6d | \code{o|s} is im|
|000003b0| 70 6f 72 74 65 64 2c 20 | 74 68 65 72 65 20 69 73 |ported, |there is|
|000003c0| 20 5c 65 6d 70 68 7b 6e | 6f 7d 0d 70 65 72 66 6f | \emph{n|o}.perfo|
|000003d0| 72 6d 61 6e 63 65 20 70 | 65 6e 61 6c 74 79 20 69 |rmance p|enalty i|
|000003e0| 6e 20 75 73 69 6e 67 20 | 66 75 6e 63 74 69 6f 6e |n using |function|
|000003f0| 73 20 66 72 6f 6d 20 5c | 63 6f 64 65 7b 6f 73 7d |s from \|code{os}|
|00000400| 20 69 6e 73 74 65 61 64 | 20 6f 66 0d 64 69 72 65 | instead| of.dire|
|00000410| 63 74 6c 79 20 66 72 6f | 6d 20 74 68 65 20 4f 53 |ctly fro|m the OS|
|00000420| 20 64 65 70 65 6e 64 65 | 6e 74 20 62 75 69 6c 74 | depende|nt built|
|00000430| 2d 69 6e 20 6d 6f 64 75 | 6c 65 2c 20 73 6f 20 74 |-in modu|le, so t|
|00000440| 68 65 72 65 20 73 68 6f | 75 6c 64 20 62 65 0d 5c |here sho|uld be.\|
|00000450| 65 6d 70 68 7b 6e 6f 7d | 20 72 65 61 73 6f 6e 20 |emph{no}| reason |
|00000460| 6e 6f 74 20 74 6f 20 75 | 73 65 20 5c 63 6f 64 65 |not to u|se \code|
|00000470| 7b 6f 73 7d 21 0d 0d 49 | 6e 20 61 64 64 69 74 69 |{os}!..I|n additi|
|00000480| 6f 6e 20 74 6f 20 77 68 | 61 74 65 76 65 72 20 74 |on to wh|atever t|
|00000490| 68 65 20 63 6f 72 72 65 | 63 74 20 4f 53 20 64 65 |he corre|ct OS de|
|000004a0| 70 65 6e 64 65 6e 74 20 | 6d 6f 64 75 6c 65 20 65 |pendent |module e|
|000004b0| 78 70 6f 72 74 73 2c 20 | 74 68 65 0d 66 6f 6c 6c |xports, |the.foll|
|000004c0| 6f 77 69 6e 67 20 76 61 | 72 69 61 62 6c 65 73 20 |owing va|riables |
|000004d0| 61 6e 64 20 66 75 6e 63 | 74 69 6f 6e 73 20 61 72 |and func|tions ar|
|000004e0| 65 20 61 6c 77 61 79 73 | 20 65 78 70 6f 72 74 65 |e always| exporte|
|000004f0| 64 20 62 79 20 5c 63 6f | 64 65 7b 6f 73 7d 3a 0d |d by \co|de{os}:.|
|00000500| 0d 5c 72 65 6e 65 77 63 | 6f 6d 6d 61 6e 64 7b 5c |.\renewc|ommand{\|
|00000510| 69 6e 64 65 78 73 75 62 | 69 74 65 6d 7d 7b 28 69 |indexsub|item}{(i|
|00000520| 6e 20 6d 6f 64 75 6c 65 | 20 6f 73 29 7d 0d 5c 62 |n module| os)}.\b|
|00000530| 65 67 69 6e 7b 64 61 74 | 61 64 65 73 63 7d 7b 6e |egin{dat|adesc}{n|
|00000540| 61 6d 65 7d 0d 54 68 65 | 20 6e 61 6d 65 20 6f 66 |ame}.The| name of|
|00000550| 20 74 68 65 20 4f 53 20 | 64 65 70 65 6e 64 65 6e | the OS |dependen|
|00000560| 74 20 6d 6f 64 75 6c 65 | 20 69 6d 70 6f 72 74 65 |t module| importe|
|00000570| 64 2c 20 65 2e 67 2e 20 | 5c 63 6f 64 65 7b 27 70 |d, e.g. |\code{'p|
|00000580| 6f 73 69 78 27 7d 20 6f | 72 0d 5c 63 6f 64 65 7b |osix'} o|r.\code{|
|00000590| 27 6d 61 63 27 7d 2e 0d | 5c 65 6e 64 7b 64 61 74 |'mac'}..|\end{dat|
|000005a0| 61 64 65 73 63 7d 0d 0d | 5c 62 65 67 69 6e 7b 64 |adesc}..|\begin{d|
|000005b0| 61 74 61 64 65 73 63 7d | 7b 70 61 74 68 7d 0d 54 |atadesc}|{path}.T|
|000005c0| 68 65 20 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 |he corre|sponding|
|000005d0| 20 4f 53 20 64 65 70 65 | 6e 64 65 6e 74 20 73 74 | OS depe|ndent st|
|000005e0| 61 6e 64 61 72 64 20 6d | 6f 64 75 6c 65 20 66 6f |andard m|odule fo|
|000005f0| 72 20 70 61 74 68 6e 61 | 6d 65 0d 6f 70 65 72 61 |r pathna|me.opera|
|00000600| 74 69 6f 6e 73 2c 20 65 | 2e 67 2e 2c 20 5c 63 6f |tions, e|.g., \co|
|00000610| 64 65 7b 70 6f 73 69 78 | 70 61 74 68 7d 20 6f 72 |de{posix|path} or|
|00000620| 20 5c 63 6f 64 65 7b 6d | 61 63 70 61 74 68 7d 2e | \code{m|acpath}.|
|00000630| 20 20 54 68 75 73 2c 20 | 28 67 69 76 65 6e 0d 74 | Thus, |(given.t|
|00000640| 68 65 20 70 72 6f 70 65 | 72 20 69 6d 70 6f 72 74 |he prope|r import|
|00000650| 73 29 2c 20 5c 63 6f 64 | 65 7b 6f 73 2e 70 61 74 |s), \cod|e{os.pat|
|00000660| 68 2e 73 70 6c 69 74 28 | 5c 76 61 72 7b 66 69 6c |h.split(|\var{fil|
|00000670| 65 7d 29 7d 20 69 73 20 | 65 71 75 69 76 61 6c 65 |e})} is |equivale|
|00000680| 6e 74 20 74 6f 20 62 75 | 74 0d 6d 6f 72 65 20 70 |nt to bu|t.more p|
|00000690| 6f 72 74 61 62 6c 65 20 | 74 68 61 6e 20 5c 63 6f |ortable |than \co|
|000006a0| 64 65 7b 70 6f 73 69 78 | 70 61 74 68 2e 73 70 6c |de{posix|path.spl|
|000006b0| 69 74 28 5c 76 61 72 7b | 66 69 6c 65 7d 29 7d 2e |it(\var{|file})}.|
|000006c0| 0d 5c 65 6e 64 7b 64 61 | 74 61 64 65 73 63 7d 0d |.\end{da|tadesc}.|
|000006d0| 0d 5c 62 65 67 69 6e 7b | 64 61 74 61 64 65 73 63 |.\begin{|datadesc|
|000006e0| 7d 7b 63 75 72 64 69 72 | 7d 0d 54 68 65 20 63 6f |}{curdir|}.The co|
|000006f0| 6e 73 74 61 6e 74 20 73 | 74 72 69 6e 67 20 75 73 |nstant s|tring us|
|00000700| 65 64 20 62 79 20 74 68 | 65 20 4f 53 20 74 6f 20 |ed by th|e OS to |
|00000710| 72 65 66 65 72 20 74 6f | 20 74 68 65 20 63 75 72 |refer to| the cur|
|00000720| 72 65 6e 74 20 64 69 72 | 65 63 74 6f 72 79 2c 0d |rent dir|ectory,.|
|00000730| 65 2e 67 2e 20 5c 63 6f | 64 65 7b 27 2e 27 7d 20 |e.g. \co|de{'.'} |
|00000740| 66 6f 72 20 50 4f 53 49 | 58 20 6f 72 20 5c 63 6f |for POSI|X or \co|
|00000750| 64 65 7b 27 3a 27 7d 20 | 66 6f 72 20 74 68 65 20 |de{':'} |for the |
|00000760| 4d 61 63 2e 0d 5c 65 6e | 64 7b 64 61 74 61 64 65 |Mac..\en|d{datade|
|00000770| 73 63 7d 0d 0d 5c 62 65 | 67 69 6e 7b 64 61 74 61 |sc}..\be|gin{data|
|00000780| 64 65 73 63 7d 7b 70 61 | 72 64 69 72 7d 0d 54 68 |desc}{pa|rdir}.Th|
|00000790| 65 20 63 6f 6e 73 74 61 | 6e 74 20 73 74 72 69 6e |e consta|nt strin|
|000007a0| 67 20 75 73 65 64 20 62 | 79 20 74 68 65 20 4f 53 |g used b|y the OS|
|000007b0| 20 74 6f 20 72 65 66 65 | 72 20 74 6f 20 74 68 65 | to refe|r to the|
|000007c0| 20 70 61 72 65 6e 74 20 | 64 69 72 65 63 74 6f 72 | parent |director|
|000007d0| 79 2c 0d 65 2e 67 2e 20 | 5c 63 6f 64 65 7b 27 2e |y,.e.g. |\code{'.|
|000007e0| 2e 27 7d 20 66 6f 72 20 | 50 4f 53 49 58 20 6f 72 |.'} for |POSIX or|
|000007f0| 20 5c 63 6f 64 65 7b 27 | 3a 3a 27 7d 20 66 6f 72 | \code{'|::'} for|
|00000800| 20 74 68 65 20 4d 61 63 | 2e 0d 5c 65 6e 64 7b 64 | the Mac|..\end{d|
|00000810| 61 74 61 64 65 73 63 7d | 0d 0d 5c 62 65 67 69 6e |atadesc}|..\begin|
|00000820| 7b 64 61 74 61 64 65 73 | 63 7d 7b 73 65 70 7d 0d |{datades|c}{sep}.|
|00000830| 54 68 65 20 63 68 61 72 | 61 63 74 65 72 20 75 73 |The char|acter us|
|00000840| 65 64 20 62 79 20 74 68 | 65 20 4f 53 20 74 6f 20 |ed by th|e OS to |
|00000850| 73 65 70 61 72 61 74 65 | 20 70 61 74 68 6e 61 6d |separate| pathnam|
|00000860| 65 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2c 20 65 2e |e compon|ents, e.|
|00000870| 67 2e 0d 5c 63 6f 64 65 | 7b 27 2f 27 7d 20 66 6f |g..\code|{'/'} fo|
|00000880| 72 20 50 4f 53 49 58 20 | 6f 72 20 5c 63 6f 64 65 |r POSIX |or \code|
|00000890| 7b 27 3a 27 7d 20 66 6f | 72 20 74 68 65 20 4d 61 |{':'} fo|r the Ma|
|000008a0| 63 2e 20 20 4e 6f 74 65 | 20 74 68 61 74 20 6b 6e |c. Note| that kn|
|000008b0| 6f 77 69 6e 67 20 74 68 | 69 73 0d 69 73 20 6e 6f |owing th|is.is no|
|000008c0| 74 20 73 75 66 66 69 63 | 69 65 6e 74 20 74 6f 20 |t suffic|ient to |
|000008d0| 62 65 20 61 62 6c 65 20 | 74 6f 20 70 61 72 73 65 |be able |to parse|
|000008e0| 20 6f 72 20 63 6f 6e 63 | 61 74 65 6e 61 74 65 20 | or conc|atenate |
|000008f0| 70 61 74 68 6e 61 6d 65 | 73 2d 2d 2d 62 65 74 74 |pathname|s---bett|
|00000900| 65 72 0d 75 73 65 20 5c | 63 6f 64 65 7b 6f 73 2e |er.use \|code{os.|
|00000910| 70 61 74 68 2e 73 70 6c | 69 74 28 29 7d 20 61 6e |path.spl|it()} an|
|00000920| 64 20 5c 63 6f 64 65 7b | 6f 73 2e 70 61 74 68 2e |d \code{|os.path.|
|00000930| 6a 6f 69 6e 28 29 7d 2d | 2d 2d 62 75 74 20 69 74 |join()}-|--but it|
|00000940| 20 69 73 0d 6f 63 63 61 | 73 69 6f 6e 61 6c 6c 79 | is.occa|sionally|
|00000950| 20 75 73 65 66 75 6c 2e | 0d 5c 65 6e 64 7b 64 61 | useful.|.\end{da|
|00000960| 74 61 64 65 73 63 7d 0d | 0d 5c 62 65 67 69 6e 7b |tadesc}.|.\begin{|
|00000970| 66 75 6e 63 64 65 73 63 | 7d 7b 65 78 65 63 6c 7d |funcdesc|}{execl}|
|00000980| 7b 70 61 74 68 5c 2c 20 | 61 72 67 30 5c 2c 20 61 |{path\, |arg0\, a|
|00000990| 72 67 31 5c 2c 20 2e 2e | 2e 7d 0d 54 68 69 73 20 |rg1\, ..|.}.This |
|000009a0| 69 73 20 65 71 75 69 76 | 61 6c 65 6e 74 20 74 6f |is equiv|alent to|
|000009b0| 20 61 20 63 61 6c 6c 20 | 74 6f 20 5c 63 6f 64 65 | a call |to \code|
|000009c0| 7b 6f 73 2e 65 78 65 63 | 76 7d 20 77 69 74 68 20 |{os.exec|v} with |
|000009d0| 61 6e 20 5c 76 61 72 7b | 61 72 67 76 7d 0d 6f 66 |an \var{|argv}.of|
|000009e0| 20 5c 63 6f 64 65 7b 5b | 5c 76 61 72 7b 61 72 67 | \code{[|\var{arg|
|000009f0| 30 7d 2c 20 5c 76 61 72 | 7b 61 72 67 31 7d 2c 20 |0}, \var|{arg1}, |
|00000a00| 2e 2e 2e 5d 7d 2e 0d 5c | 65 6e 64 7b 66 75 6e 63 |...]}..\|end{func|
|00000a10| 64 65 73 63 7d 0d 0d 5c | 62 65 67 69 6e 7b 66 75 |desc}..\|begin{fu|
|00000a20| 6e 63 64 65 73 63 7d 7b | 65 78 65 63 6c 65 7d 7b |ncdesc}{|execle}{|
|00000a30| 70 61 74 68 5c 2c 20 61 | 72 67 30 5c 2c 20 61 72 |path\, a|rg0\, ar|
|00000a40| 67 31 5c 2c 20 2e 2e 2e | 5c 2c 20 65 6e 76 7d 0d |g1\, ...|\, env}.|
|00000a50| 54 68 69 73 20 69 73 20 | 65 71 75 69 76 61 6c 65 |This is |equivale|
|00000a60| 6e 74 20 74 6f 20 61 20 | 63 61 6c 6c 20 74 6f 20 |nt to a |call to |
|00000a70| 5c 63 6f 64 65 7b 6f 73 | 2e 65 78 65 63 76 65 7d |\code{os|.execve}|
|00000a80| 20 77 69 74 68 20 61 6e | 20 5c 76 61 72 7b 61 72 | with an| \var{ar|
|00000a90| 67 76 7d 0d 6f 66 20 5c | 63 6f 64 65 7b 5b 5c 76 |gv}.of \|code{[\v|
|00000aa0| 61 72 7b 61 72 67 30 7d | 2c 20 5c 76 61 72 7b 61 |ar{arg0}|, \var{a|
|00000ab0| 72 67 31 7d 2c 20 2e 2e | 2e 5d 7d 2e 0d 5c 65 6e |rg1}, ..|.]}..\en|
|00000ac0| 64 7b 66 75 6e 63 64 65 | 73 63 7d 0d 0d 5c 62 65 |d{funcde|sc}..\be|
|00000ad0| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 65 78 |gin{func|desc}{ex|
|00000ae0| 65 63 6c 70 7d 7b 70 61 | 74 68 5c 2c 20 61 72 67 |eclp}{pa|th\, arg|
|00000af0| 30 5c 2c 20 61 72 67 31 | 5c 2c 20 2e 2e 2e 7d 0d |0\, arg1|\, ...}.|
|00000b00| 54 68 69 73 20 69 73 20 | 6c 69 6b 65 20 5c 63 6f |This is |like \co|
|00000b10| 64 65 7b 65 78 65 63 6c | 7d 20 62 75 74 20 64 75 |de{execl|} but du|
|00000b20| 70 6c 69 63 61 74 65 73 | 20 74 68 65 20 73 68 65 |plicates| the she|
|00000b30| 6c 6c 27 73 20 61 63 74 | 69 6f 6e 73 20 69 6e 0d |ll's act|ions in.|
|00000b40| 73 65 61 72 63 68 69 6e | 67 20 66 6f 72 20 61 6e |searchin|g for an|
|00000b50| 20 65 78 65 63 75 74 61 | 62 6c 65 20 66 69 6c 65 | executa|ble file|
|00000b60| 20 69 6e 20 61 20 6c 69 | 73 74 20 6f 66 20 64 69 | in a li|st of di|
|00000b70| 72 65 63 74 6f 72 69 65 | 73 2e 20 20 54 68 65 0d |rectorie|s. The.|
|00000b80| 64 69 72 65 63 74 6f 72 | 79 20 6c 69 73 74 20 69 |director|y list i|
|00000b90| 73 20 6f 62 74 61 69 6e | 65 64 20 66 72 6f 6d 20 |s obtain|ed from |
|00000ba0| 5c 63 6f 64 65 7b 65 6e | 76 69 72 6f 6e 5b 27 50 |\code{en|viron['P|
|00000bb0| 41 54 48 27 5d 7d 2e 0d | 5c 65 6e 64 7b 66 75 6e |ATH']}..|\end{fun|
|00000bc0| 63 64 65 73 63 7d 0d 0d | 5c 62 65 67 69 6e 7b 66 |cdesc}..|\begin{f|
|00000bd0| 75 6e 63 64 65 73 63 7d | 7b 65 78 65 63 76 70 7d |uncdesc}|{execvp}|
|00000be0| 7b 70 61 74 68 5c 2c 20 | 61 72 67 30 5c 2c 20 61 |{path\, |arg0\, a|
|00000bf0| 72 67 31 5c 2c 20 2e 2e | 2e 7d 0d 5c 63 6f 64 65 |rg1\, ..|.}.\code|
|00000c00| 7b 65 78 65 63 76 70 7d | 20 69 73 20 66 6f 72 20 |{execvp}| is for |
|00000c10| 5c 63 6f 64 65 7b 65 78 | 65 63 76 7d 20 77 68 61 |\code{ex|ecv} wha|
|00000c20| 74 20 5c 63 6f 64 65 7b | 65 78 65 63 6c 70 7d 20 |t \code{|execlp} |
|00000c30| 69 73 20 66 6f 72 20 5c | 63 6f 64 65 7b 65 78 65 |is for \|code{exe|
|00000c40| 63 6c 7d 2e 0d 5c 65 6e | 64 7b 66 75 6e 63 64 65 |cl}..\en|d{funcde|
|00000c50| 73 63 7d 0d | |sc}. | |
+--------+-------------------------+-------------------------+--------+--------+