<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.posix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'es',
  ),
  'this' => 
  array (
    0 => 'function.posix-getsid.php',
    1 => 'posix_getsid',
    2 => 'Obtener el sid actual del proceos',
  ),
  'up' => 
  array (
    0 => 'ref.posix.php',
    1 => 'Funciones POSIX',
  ),
  'prev' => 
  array (
    0 => 'function.posix-getrlimit.php',
    1 => 'posix_getrlimit',
  ),
  'next' => 
  array (
    0 => 'function.posix-getuid.php',
    1 => 'posix_getuid',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'es',
    'path' => 'reference/posix/functions/posix-getsid.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.posix-getsid" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_getsid</h1>
  <p class="verinfo">(PHP 4, PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">posix_getsid</span> &mdash; <span class="dc-title">Obtener el sid actual del proceos</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.posix-getsid-description">
  <h3 class="title">Descripción</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>posix_getsid</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$process_id</code></span>): <span class="type"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   Devuelve el identificador de sesión del proceso <code class="parameter">process_id</code>.
   El identificador de sesión de un proceso es el id de grupo del proceso del líder de la sesión.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.posix-getsid-parameters">
  <h3 class="title">Parámetros</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">process_id</code></dt>
     <dd>
      <p class="para">
       Eñ identificador de proceso. Si se establece a 0, se asume el proceso
       actual. Si se especifica un <code class="parameter">process_id</code> no
       válido, se devuelve <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> y se establece un error que
       puede ser verificado con <span class="function"><a href="function.posix-get-last-error.php" class="function">posix_get_last_error()</a></span>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-getsid-returnvalues">
  <h3 class="title">Valores devueltos</h3>
  <p class="para">
   Devuelve el identificador, como valor de tipo <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>,  o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> si ocurre un error.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.posix-getsid-examples">
  <h3 class="title">Ejemplos</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Ejemplo #1 Ejemplo de uso de <span class="function"><strong>posix_getsid()</strong></span></strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$pid </span><span style="color: #007700">= </span><span style="color: #0000BB">posix_getpid</span><span style="color: #007700">();<br />echo </span><span style="color: #0000BB">posix_getsid</span><span style="color: #007700">(</span><span style="color: #0000BB">$pid</span><span style="color: #007700">); </span><span style="color: #FF8000">//8805<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.posix-getsid-seealso">
  <h3 class="title">Ver también</h3>
  <p class="para">
   <ul class="simplelist">
    <li>
     <span class="function"><a href="function.posix-getpgid.php" class="function" rel="rdfs-seeAlso">posix_getpgid()</a> - Obtener el id del grupo de procesos para un control de trabajo</span>
    </li>
    <li>
     <span class="function"><a href="function.posix-setsid.php" class="function" rel="rdfs-seeAlso">posix_setsid()</a> - Hacer del proceso actual un l&iacute;der de sesi&oacute;n</span>
    </li>
    <li>POSIX man page GETSID(2)</li>
   </ul>
  </p>
 </div>



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