5462bd | 2002-08-09 | Martin Nilsson | | <html><head>
<style type='text/css'>
svg line { stroke:#343434; stroke-width:2; }
svg text { fill:#343434; }
svg a { fill:#0768b2; text-decoration: underline; }
</style>
<title>Pike Reference Manual - Process.popen()</title>
<link rel='stylesheet' href='../../../style.css' /></head>
<body topmargin='0' leftmargin='0' marginheight='0' marginwidth='0'
bgcolor='#ffffff' text='#000000' link='#000099' alink='#002040'
vlink='#000099'>
|
e606d1 | 2003-07-03 | Martin Nilsson | | <table width="100%">
|
5462bd | 2002-08-09 | Martin Nilsson | | <tr>
<td colspan='3'></td>
<td colspan='2' align='right'>Extracted from at .</td>
</tr>
<tr>
<td width="0%"><img src="../../../../images/unit.gif" alt="" width="10" height="1"></td>
<td width="1%">
<a href="http://pike.lysator.liu.se/"><img src="../../../../images/pike_logo.gif"
border="0" alt="pike.lysator.liu.se" width="181" height="41" hspace="5"></a></td>
<td width="0%"><img src="../../../../images/unit.gif" alt="" width="10" height="1"></td>
<td width="99%">
<table align="center" border="0" width="100%" cellspacing="0" cellpadding="0" valign="middle">
<tr>
<td width="1%" align="right"><img src="../../../../images/pike_line_left.gif" alt="" border="0" width="5" height="11"></td>
|
db48fe | 2011-11-20 | Henrik Grubbström (Grubba) | | <td background="../../../../images/pike_line_middle.gif" width="98%"><img src="../../..//../../../../images/unit.gif" alt="" border="0" width="11" height="11"></td>
|
5462bd | 2002-08-09 | Martin Nilsson | | <td width="1%" align="left"><img src="../../../../images/pike_line_right.gif" alt="" border="0" width="5" height="11"></td>
</tr>
</table>
</td>
<td width="0%"><img src="../../../../images/unit.gif" alt="" width="10" height="1"></td>
</tr>
<tr>
<td colspan="5"><img src="../../../../images/unit.gif" alt="" width="1" height="10"></td>
</tr>
</table>
<table>
<tr>
<td width='180' valign='top' bgcolor='#f0f0f0'><a href='../../../index.html'><b class='top head'>Top</b></a>
<a href='../../../ex/predef_3A_3A/Process.html'><b class='head'>Process</b></a>
<script></script>
<noscript>
<div class='sidebar'>
<a href='../../../ex/predef_3A_3A/Process/index.html'><b>Symbol index</b></a><br />
</div>
</noscript>
</td>
<td width='520' valign='top'>
<table border="0" width="520" bgcolor="#e0e0e0"
cellpadding="0" cellspacing="4" class='sidebar'>
<tr>
<td valign="middle">
|
7f8d88 | 2011-09-12 | Henrik Grubbström (Grubba) | | <a href="../../../ex/predef_3A_3A/Process/get_forkd_default.html"><img src="../../../../images/prev.gif" hspace="3"
border="0" alt="previous" >Process.get_forkd_default()</a>
|
5462bd | 2002-08-09 | Martin Nilsson | | <br />
</td>
<td align="right" valign="middle">
|
606c9a | 2006-04-24 | Robert Hinn | | <a href="../../../ex/predef_3A_3A/Process/run.html">Process.run()<img src="../../../../images/next.gif" hspace="3"
|
5462bd | 2002-08-09 | Martin Nilsson | | border="0" alt="next" ></a>
<br />
</td>
</tr>
</table>
<h1>Method Process.popen()</h1>
<hr />
<dl class='group--doc'>
<dt class='head--type'><span class='homogen--type'>Method</span>
<span class='homogen--name'><b>popen</b></span>
</dt>
|
c3869d | 2004-05-10 | Martin Nilsson | | <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>
|
c9baea | 2004-05-01 | Dan Nelson | |
<dt class='head--doc'>Description</dt>
|
471cf1 | 2005-02-10 | Martin Stjernholm | | <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 -c
<a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Unix, "<code class='expr'>cmd /c <a class='ms reference' 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>
|
c3869d | 2004-05-10 | Martin Nilsson | | </dd></dl>
<hr />
<dl class='group--doc'>
<dt class='head--type'><span class='homogen--type'>Method</span>
<span class='homogen--name'><b>popen</b></span>
</dt>
<dd><p><code><code class='object resolved'><a class='ms reference' href='../../predef_3A_3A/Stdio/FILE.html'>Stdio.FILE</a></code> <b><span class='method'>popen</span>(</b><code class='datatype'>string</code> <code class='argument'>command</code>, <code class='datatype'>string</code> <code class='argument'>mode</code><b>)</b></code></p></dd>
<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
|
471cf1 | 2005-02-10 | Martin Stjernholm | | as a shell statement ("<code class='expr'>/bin/sh -c <a class='ms reference' href='../../predef_3A_3A/Process/popen.html'>command</a></code>" for Unix,
"<code class='expr'>cmd /c <a class='ms reference' 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
|
c3869d | 2004-05-10 | Martin Nilsson | | is available for read.</p>
</td></tr>
|
471cf1 | 2005-02-10 | Martin Stjernholm | | <tr><td><code><code class='key'>"w"</code></code></td><td><p>Open for writing. Data written to the file is available
|
c3869d | 2004-05-10 | Martin Nilsson | | to the process on stdin.</p>
</td></tr>
</table>
|
471cf1 | 2005-02-10 | Martin Stjernholm | | </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>
|
c9baea | 2004-05-01 | Dan Nelson | | </dd></dl>
|
5462bd | 2002-08-09 | Martin Nilsson | |
<hr size='1' noshade='1' />
</td>
</tr>
</table>
</body>
<script>PikeDoc.current = {"link":"ex/predef_3A_3A/Process/popen.html","name":"popen"};</script>
<script src='../../../ex/predef_3A_3A/Process/index.js'></script>
<script src='../../../ex/predef_3A_3A/Process/load_index.js'></script>
|
b70756 | 2011-03-06 | Henrik Grubbström (Grubba) | | </html>
|