36ee1e | 2015-10-12 | Pontus Östlund | | <!doctype html>
|
5a6e09 | 2011-12-03 | Henrik Grubbström (Grubba) | | <html>
<head>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <meta content="width=device-width, initial-scale=1" name="viewport">
|
7e5ead | 2016-01-20 | Pontus Östlund | | <meta charset="utf-8">
|
c0c2c8 | 2016-11-14 | Pontus Östlund | | <title>Process.popen() - Pike Reference Manual</title>
|
078087 | 2016-10-04 | Pontus Östlund | | |
36ee1e | 2015-10-12 | Pontus Östlund | | <link rel='stylesheet' href='../../../style.css'>
<script src='../../../site.js'></script>
|
078087 | 2016-10-04 | Pontus Östlund | | <script src='../../../constants.js'></script>
<script>PikeDoc.NO_DYNAMIC = true;</script>
|
0851b0 | 2012-03-11 | Tobias S. Josefowitz | | <style type='text/css'>
|
5462bd | 2002-08-09 | Martin Nilsson | | svg line { stroke:#343434; stroke-width:2; }
svg text { fill:#343434; }
svg a { fill:#0768b2; text-decoration: underline; }
</style>
|
5a6e09 | 2011-12-03 | Henrik Grubbström (Grubba) | | </head>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <body>
|
5a6e09 | 2011-12-03 | Henrik Grubbström (Grubba) | | <header>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <div class="header">
|
0e3f09 | 2016-04-19 | Henrik Grubbström (Grubba) | | <div id="version"><strong data-id="version"></strong></div>
|
ed0b3d | 2016-12-10 | Martin Nilsson | | <button id="burger">
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
<span class="bar"></span>
</button> |
7e5ead | 2016-01-20 | Pontus Östlund | | <h1>
|
0e3f09 | 2016-04-19 | Henrik Grubbström (Grubba) | | <a href="http://pike.lysator.liu.se/" class="logo">
|
7e5ead | 2016-01-20 | Pontus Östlund | | <span>Pike programming language</span>
</a>
</h1>
|
587868 | 2012-02-05 | Henrik Grubbström (Grubba) | | </div>
|
5a6e09 | 2011-12-03 | Henrik Grubbström (Grubba) | | </header>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <div id="page">
|
587868 | 2012-02-05 | Henrik Grubbström (Grubba) | | <div class="navbar">
|
36ee1e | 2015-10-12 | Pontus Östlund | | <nav>
|
7e5ead | 2016-01-20 | Pontus Östlund | | <div class="inner" id="navbar">
|
36ee1e | 2015-10-12 | Pontus Östlund | | <a href='../../../index.html'><b class='top head'>Top</b></a>
|
5462bd | 2002-08-09 | Martin Nilsson | | <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>
|
36ee1e | 2015-10-12 | Pontus Östlund | | </div>
</nav>
|
587868 | 2012-02-05 | Henrik Grubbström (Grubba) | | </div>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <div class="content">
<div class="navbox">
<nav>
<div class="sidebar">
<a href="../../../ex/predef_3A_3A/Process/get_forkd_default.html" class="prev"><span>➤</span> Process.get_forkd_default()</a>
|
d14729 | 2022-11-06 | Peter Bortas | | <a href="../../../ex/predef_3A_3A/Process/search_path.html" class="next">Process.search_path() <span>➤</span></a>
|
36ee1e | 2015-10-12 | Pontus Östlund | | </div>
</nav>
</div>
<div class="contentbox">
<article>
<h1>Method Process.popen()</h1>
|
5462bd | 2002-08-09 | Martin Nilsson | |
<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>
|
e52650 | 2020-05-24 | Henrik Grubbström (Grubba) | | <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>
|
c3869d | 2004-05-10 | Martin Nilsson | |
<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 | |
|
36ee1e | 2015-10-12 | Pontus Östlund | | </article>
</div>
|
587868 | 2012-02-05 | Henrik Grubbström (Grubba) | | </div>
</div>
|
36ee1e | 2015-10-12 | Pontus Östlund | | <footer>
|
078087 | 2016-10-04 | Pontus Östlund | | <div id="build-date">Extracted from <strong data-id="version"></strong> as of <strong data-id="date" data-timestamp=""></strong>.</div>
|
36ee1e | 2015-10-12 | Pontus Östlund | | </footer>
|
7e5ead | 2016-01-20 | Pontus Östlund | | <script>PikeDoc.current = {"link":"ex/predef_3A_3A/Process/popen.html","name":"popen"};</script>
|
5462bd | 2002-08-09 | Martin Nilsson | | <script src='../../../ex/predef_3A_3A/Process/index.js'></script>
<script src='../../../ex/predef_3A_3A/Process/load_index.js'></script>
|
7e5ead | 2016-01-20 | Pontus Östlund | | <script>
// Tell PikeDoc that next actions are from loaded scripts
PikeDoc.isInline = false;
</script>
</body>
|
b70756 | 2011-03-06 | Henrik Grubbström (Grubba) | | </html>
|