Source of: /manual/en/function.proc-close.php
<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.exec.inc";
$setup = array (
'home' =>
array (
0 => 'index.php',
1 => 'PHP Manual',
),
'head' =>
array (
0 => 'UTF-8',
1 => 'en',
),
'this' =>
array (
0 => 'function.proc-close.php',
1 => 'proc_close',
),
'up' =>
array (
0 => 'ref.exec.php',
1 => 'Program execution Functions',
),
'prev' =>
array (
0 => 'function.passthru.php',
1 => 'passthru',
),
'next' =>
array (
0 => 'function.proc-get-status.php',
1 => 'proc_get_status',
),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);
manual_header();
?>
<div id="function.proc-close" class="refentry">
<div class="refnamediv">
<h1 class="refname">proc_close</h1>
<p class="verinfo">(PHP 4 >= 4.3.0, PHP 5)</p><p class="refpurpose"><span class="refname">proc_close</span> — <span class="dc-title">Close a process opened by <a href="function.proc-open.php" class="function">proc_open()</a> and return the exit code of that process</span></p>
</div>
<a name="function.proc-close.description"></a><div class="refsect1 description">
<h3 class="title">Description</h3>
<div class="methodsynopsis dc-description">
<span class="type">int</span> <span class="methodname"><b>proc_close</b></span>
( <span class="methodparam"><span class="type">resource</span> <tt class="parameter">$process</tt></span>
)</div>
<p class="para rdfs-comment">
<b>proc_close()</b> is similar to <a href="function.pclose.php" class="function">pclose()</a>
except that it only works on processes opened by
<a href="function.proc-open.php" class="function">proc_open()</a>.
<b>proc_close()</b> waits for the process to terminate, and
returns its exit code. If you have open pipes to that process, you
should <a href="function.fclose.php" class="function">fclose()</a> them prior to calling this function in
order to avoid a deadlock - the child process may not be able to exit
while the pipes are open.
</p>
</div>
<a name="function.proc-close.parameters"></a><div class="refsect1 parameters">
<h3 class="title">Parameters</h3>
<p class="para">
</p><dl>
<dt class="varlistentry">
<span class="term"><i><tt class="parameter">process</tt></i>
</span>
</dt><dd class="listitem">
<p class="para">
The <a href="function.proc-open.php" class="function">proc_open()</a> <a href="language.types.resource.php" class="type resource">resource</a> that will
be closed.
</p>
</dd>
</dl>
<p>
</p>
</div>
<a name="function.proc-close.returnvalues"></a><div class="refsect1 returnvalues">
<h3 class="title">Return Values</h3>
<p class="para">
Returns the termination status of the process that was run.
</p>
</div>
</div><?php manual_footer(); ?>