Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5456

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Get information about a process opened by proc_open</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.proc-close.html">proc_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.proc-nice.html">proc_nice</a></div>
 <div class="up"><a href="ref.exec.html">Program execution Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.proc-get-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">proc_get_status</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">proc_get_status</span> &mdash; <span class="dc-title">Get information about a process opened by  <span class="function"><a href="function.proc-open.html" class="function">proc_open()</a></span></span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.proc-get-status-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">array</span> <span class="methodname"><strong>proc_get_status</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$process</code></span>
   )</div>

  <p class="para rdfs-comment">
    <span class="function"><strong>proc_get_status()</strong></span> fetches data about a
   process opened using  <span class="function"><a href="function.proc-open.html" class="function">proc_open()</a></span>.
  </p>
 </div>

 
 <div class="refsect1 parameters" id="refsect1-function.proc-get-status-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">process</code></em></span>
     <dd>

      <p class="para">
       The  <span class="function"><a href="function.proc-open.html" class="function">proc_open()</a></span> <span class="type"><a href="language.types.resource.html" class="type resource">resource</a></span> that will
       be evaluated.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.proc-get-status-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   An <span class="type"><a href="language.types.array.html" class="type array">array</a></span> of collected information on success, and <strong><code>FALSE</code></strong>
   on failure. The returned array contains the following elements:
  </p>
  <p class="para">
  <table class="doctable informaltable">
   
    <thead>
     <tr><th>element</th><th>type</th><th>description</th></tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>command</td>
      <td><span class="type"><a href="language.types.string.html" class="type string">string</a></span></td>
      <td>
       The command string that was passed to  <span class="function"><a href="function.proc-open.html" class="function">proc_open()</a></span>.
      </td>
     </tr>

     <tr>
      <td>pid</td>
      <td><span class="type"><a href="language.types.integer.html" class="type int">int</a></span></td>
      <td>process id</td>
     </tr>

     <tr>
      <td>running</td>
      <td><span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span></td>
      <td>
       <strong><code>TRUE</code></strong> if the process is still running, <strong><code>FALSE</code></strong> if it has
       terminated.
      </td>
     </tr>

     <tr>
      <td>signaled</td>
      <td><span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span></td>
      <td>
       <strong><code>TRUE</code></strong> if the child process has been terminated by
       an uncaught signal. Always set to <strong><code>FALSE</code></strong> on Windows.
      </td>
     </tr>

     <tr>
      <td>stopped</td>
      <td><span class="type"><a href="language.types.boolean.html" class="type bool">bool</a></span></td>
      <td>
       <strong><code>TRUE</code></strong> if the child process has been stopped by a
       signal. Always set to <strong><code>FALSE</code></strong> on Windows.
      </td>
     </tr>

     <tr>
      <td>exitcode</td>
      <td><span class="type"><a href="language.types.integer.html" class="type int">int</a></span></td>
      <td>
       The exit code returned by the process (which is only
       meaningful if <em>running</em> is <strong><code>FALSE</code></strong>).
       Only first call of this function return real value, next calls return
       <em>-1</em>.
      </td>
     </tr>

     <tr>
      <td>termsig</td>
      <td><span class="type"><a href="language.types.integer.html" class="type int">int</a></span></td>
      <td>
       The number of the signal that caused the child process to terminate
       its execution (only meaningful if <em>signaled</em> is <strong><code>TRUE</code></strong>).
      </td>
     </tr>

     <tr>
      <td>stopsig</td>
      <td><span class="type"><a href="language.types.integer.html" class="type int">int</a></span></td>
      <td>
       The number of the signal that caused the child process to stop its
       execution (only meaningful if <em>stopped</em> is <strong><code>TRUE</code></strong>).
      </td>
     </tr>

    </tbody>
   
  </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.proc-get-status-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.proc-open.html" class="function" rel="rdfs-seeAlso">proc_open()</a> - Execute a command and open file pointers for input/output</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.proc-close.html">proc_close</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.proc-nice.html">proc_nice</a></div>
 <div class="up"><a href="ref.exec.html">Program execution Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>