<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.pcntl.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'de',
  ),
  'this' => 
  array (
    0 => 'function.pcntl-unshare.php',
    1 => 'pcntl_unshare',
    2 => 'Dissociates parts of the process execution context',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'PCNTL Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-strerror.php',
    1 => 'pcntl_strerror',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-wait.php',
    1 => 'pcntl_wait',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pcntl/functions/pcntl-unshare.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-unshare" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_unshare</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.4.0, PHP 8)</p><p class="refpurpose"><span class="refname">pcntl_unshare</span> &mdash; <span class="dc-title">Dissociates parts of the process execution context</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.pcntl-unshare-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_unshare</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$flags</code></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>pcntl_unshare()</strong></span> allows a process to disassociate parts of its execution context that are
   currently being shared with other processes.
   The main use of <span class="function"><strong>pcntl_unshare()</strong></span> is to allow a process to control
   its shared execution context without creating a new process.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-unshare-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       The <code class="parameter">flags</code> parameter is a bitmask that specifies which parts of the execution context should be unshared.
       This parameter is specified by ORing together zero or more of the <code class="literal">CLONE_*</code> constants:
       <ul class="simplelist">
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newns">CLONE_NEWNS</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newipc">CLONE_NEWIPC</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newuts">CLONE_NEWUTS</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newnet">CLONE_NEWNET</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newpid">CLONE_NEWPID</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newuser">CLONE_NEWUSER</a></code></strong></li>
        <li><strong><code><a href="pcntl.constants.php#constant.clone-newcgroup">CLONE_NEWCGROUP</a></code></strong></li>
       </ul>
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pcntl-unshare-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Returns <code class="literal">0</code> on success, <code class="literal">-1</code> otherwise.
   On failure it sets an error code, that can be retrieved with <span class="function"><a href="function.pcntl-get-last-error.php" class="function">pcntl_get_last_error()</a></span>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.pcntl-unshare-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><a href="pcntl.constants.php#pcntl.constants.clone" class="link">PCNTL Constants</a></li>
    <li><span class="function"><a href="function.pcntl-get-last-error.php" class="function" rel="rdfs-seeAlso">pcntl_get_last_error()</a> - Retrieve the error number set by the last pcntl function which failed</span></li>
   </ul>
  </p>
 </div>


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