Branch: Tag:

2005-02-10

2005-02-10 22:09:04 by Martin Stjernholm <mast@lysator.liu.se>

Added some docs. Extended system() a little to pass on some args to
spawn().

Rev: lib/modules/Process.pmod:1.49

77:   <dd><p><code><code class='datatype'>string</code> <b><span class='method'>popen</span>(</b><code class='datatype'>string</code> <code class='argument'>command</code><b>)</b></code></p></dd>      <dt class='head--doc'>Description</dt> - <dd class='body--doc'><p>Executes the <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>command</a>, waits until it has finished and returns -  the result as a string.</p> + <dd class='body--doc'><p>Executes <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>command</a> as a shell statement ("<code class='expr'>/bin/sh&nbsp;-c + &nbsp;<a&nbsp;class='ms&nbsp;reference'&nbsp;href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Unix, "<code class='expr'>cmd&nbsp;/c&nbsp;<a&nbsp;class='ms&nbsp;reference'&nbsp;href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Windows), +  waits until it has finished and returns the result as a string.</p> + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><a class='ms reference' href='../../predef_3A_3A/Process/system.html'>system</a>, <a class='ms reference' href='../../predef_3A_3A/Process/spawn.html'>spawn</a></p>   </dd></dl>      
91:      <dt class='head--doc'>Description</dt>   <dd class='body--doc'><p>Open a "process" for reading or writing. The <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>command</a> is executed -  as a shell statement ("/bin/sh -c command" for Unix, -  "cmd /c command" for Windows). The parameter <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>mode</a> should -  be one of the following letters:</p> - <table class='box'><tr><td><code><code class='key'>'r'</code></code></td><td><p>Open for reading. Data written by the process to stdout +  as a shell statement ("<code class='expr'>/bin/sh&nbsp;-c&nbsp;<a&nbsp;class='ms&nbsp;reference'&nbsp;href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Unix, +  "<code class='expr'>cmd&nbsp;/c&nbsp;<a&nbsp;class='ms&nbsp;reference'&nbsp;href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Windows). The parameter <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>mode</a> +  should be one of the following letters:</p> + <table class='box'><tr><td><code><code class='key'>"r"</code></code></td><td><p>Open for reading. Data written by the process to stdout    is available for read.</p>   </td></tr> - <tr><td><code><code class='key'>'w'</code></code></td><td><p>Open for writing. Data written to the file is available + <tr><td><code><code class='key'>"w"</code></code></td><td><p>Open for writing. Data written to the file is available    to the process on stdin.</p>   </td></tr>   </table> -  + </dd> + <dt class='head--doc'>See also</dt> + <dd class='body--doc'><p><a class='ms reference' href='../../predef_3A_3A/Process/system.html'>system</a>, <a class='ms reference' href='../../predef_3A_3A/Process/spawn.html'>spawn</a></p>   </dd></dl>