<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = 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 => 'fr',
  ),
  'this' => 
  array (
    0 => 'function.proc-get-status.php',
    1 => 'proc_get_status',
    2 => 'Lit les informations concernant un processus ouvert par proc_open',
  ),
  'up' => 
  array (
    0 => 'ref.exec.php',
    1 => 'Fonctions sur l\'ex&eacute;cution de programmes externes',
  ),
  'prev' => 
  array (
    0 => 'function.proc-close.php',
    1 => 'proc_close',
  ),
  'next' => 
  array (
    0 => 'function.proc-nice.php',
    1 => 'proc_nice',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'fr',
    'path' => 'reference/exec/functions/proc-get-status.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.proc-get-status" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">proc_get_status</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">proc_get_status</span> &mdash; <span class="dc-title">
   Lit les informations concernant un processus ouvert par <span class="function"><a href="function.proc-open.php" 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="methodname"><strong>proc_get_status</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$process</code></span>): <span class="type"><a href="language.types.array.php" class="type array">array</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>proc_get_status()</strong></span> lit les données concernant le
   processus <code class="parameter">process</code> créé avec la fonction
   <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.proc-get-status-parameters">
  <h3 class="title">Liste de paramètres</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">process</code></dt>
     <dd>
      <p class="para">
       La <span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span> à évaluer.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.proc-get-status-returnvalues">
  <h3 class="title">Valeurs de retour</h3>
  <p class="para">
   Un tableau contenant les informations collectées.
   Le tableau retourné contient les éléments suivants :
  </p>
  <p class="para">
   <table class="doctable informaltable">
    
     <thead>
      <tr><th>Élément</th><th>Type</th><th>Description</th></tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td>command</td>
       <td><a href="language.types.string.php" class="link">chaîne de caractères</a></td>
       <td>
        La commande passée à la fonction <span class="function"><a href="function.proc-open.php" class="function">proc_open()</a></span>.
       </td>
      </tr>

      <tr>
       <td>pid</td>
       <td><a href="language.types.integer.php" class="link">entier</a></td>
       <td>identifiant du processus</td>
      </tr>

      <tr>
       <td>running</td>
       <td><a href="language.types.boolean.php" class="link">booléen</a></td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si le processus fonctionne toujours et 
        <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> s&#039;il est terminé.
       </td>
      </tr>

      <tr>
       <td>signaled</td>
       <td><a href="language.types.boolean.php" class="link">booléen</a></td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si le processus fils a été terminé par un signal inconnu.
        Toujours défini à <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> sous Windows.
       </td>
      </tr>

      <tr>
       <td>stopped</td>
       <td><a href="language.types.boolean.php" class="link">booléen</a></td>
       <td>
        <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> si le processus fils a été stoppé par un signal.
        Toujours défini à <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> sous Windows.
       </td>
      </tr>

      <tr>
       <td>exitcode</td>
       <td><a href="language.types.integer.php" class="link">entier</a></td>
       <td>
        Le code retourné par le processus (uniquement si l&#039;élément
        <code class="literal">running</code> vaut <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong>).
        Avant PHP 8.3.0, seul le premier appel de cette fonction retournait la vraie valeur, les appels suivants retournaient <code class="literal">-1</code>.</td>
     </tr>

     <tr>
      <td>cached</td>
      <td><span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></td>
      <td>
       À partir de PHP 8.3.0, vaut <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> lorsque le code de sortie est mis en cache.
       La mise en cache est nécessaire pour s&#039;assurer que le code de sortie n&#039;est pas perdu
       lors des appels suivants aux API de traitement des processus.
       </td>
      </tr>

      <tr>
       <td>termsig</td>
       <td><a href="language.types.integer.php" class="link">entier</a></td>
       <td>
        le numéro du signal qui a causé la fin de l&#039;exécution du processus fils
        (uniquement significatif si <code class="literal">signaled</code> vaut <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>).
       </td>
      </tr>

      <tr>
       <td>stopsig</td>
       <td><a href="language.types.integer.php" class="link">entier</a></td>
       <td>
        le numéro du signal qui a causé l&#039;arrêt de l&#039;exécution du processus fils
        (uniquement significatif si <code class="literal">stopped</code> vaut <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong>).
       </td>
      </tr>

     </tbody>
    
   </table>

  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.proc-get-status-changelog">
  <h3 class="title">Historique</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Description</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.3.0</td>
      <td>
       L&#039;entrée <code class="literal">&quot;cached&quot;</code> a été ajoutée au tableau retourné.
       Avant PHP 8.3.0, seul le premier appel retournait le vrai code de sortie.
       L&#039;entrée <code class="literal">&quot;cached&quot;</code> indique que le code de sortie a été mis en cache.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.proc-get-status-seealso">
  <h3 class="title">Voir aussi</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.proc-open.php" class="function" rel="rdfs-seeAlso">proc_open()</a> - Ex&eacute;cute une commande et ouvre les pointeurs de fichiers pour les entr&eacute;es / sorties</span></li>
   </ul>
  </p>
 </div>

</div><?php manual_footer($setup); ?>