Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5459

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>Kills 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-open.html">proc_open</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.shell-exec.html">shell_exec</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-terminate" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">proc_terminate</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">proc_terminate</span> &mdash; <span class="dc-title">Kills a process opened by proc_open</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.proc-terminate-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">bool</span> <span class="methodname"><strong>proc_terminate</strong></span>
    ( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$process</code></span>
   [, <span class="methodparam"><span class="type">int</span> <code class="parameter">$signal</code><span class="initializer"> = 15</span></span>
  ] )</div>

  <p class="para rdfs-comment">
   Signals a <em><code class="parameter">process</code></em> (created using
    <span class="function"><a href="function.proc-open.html" class="function">proc_open()</a></span>) that it should terminate.
    <span class="function"><strong>proc_terminate()</strong></span> returns immediately and does not wait
   for the process to terminate.
  </p>
  <p class="para">
    <span class="function"><strong>proc_terminate()</strong></span> allows you terminate the process and
   continue with other tasks.  You may poll the process (to see if it has
   stopped yet) by using the  <span class="function"><a href="function.proc-get-status.html" class="function">proc_get_status()</a></span> function.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.proc-terminate-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 closed.
      </p>
     </dd>

    </dt>

    <dt>

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

      <p class="para">
       This optional parameter is only useful on <acronym title="Portable Operating System Interface">POSIX</acronym>
       operating systems; you may specify a signal to send to the process
       using the <em>kill(2)</em> system call.  The default is
       <em>SIGTERM</em>.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.proc-terminate-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the termination status of the process that was run.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.proc-terminate-changelog">
  <h3 class="title">Changelog</h3>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr>
       <th>Version</th>
       <th>Description</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>5.2.2</td>
       <td>
        Previous versions used to destroy the given process
        <em><code class="parameter">resource</code></em>.
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.proc-terminate-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>
    <li class="member"> <span class="function"><a href="function.proc-close.html" class="function" rel="rdfs-seeAlso">proc_close()</a> - Close a process opened by proc_open and return the exit code of that process</span></li>
    <li class="member"> <span class="function"><a href="function.proc-get-status.html" class="function" rel="rdfs-seeAlso">proc_get_status()</a> - Get information about a process opened by proc_open</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-open.html">proc_open</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.shell-exec.html">shell_exec</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>