<?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 => 'ru',
  ),
  'this' => 
  array (
    0 => 'function.pcntl-unshare.php',
    1 => 'pcntl_unshare',
    2 => 'Разделяет части контекста выполнения процесса',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'Функции модуля PCNTL',
  ),
  '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' => 'ru',
    '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">Разделяет части контекста выполнения процесса</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pcntl-unshare-description">
  <h3 class="title">Описание</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> позволяет процессу отсоединить части своего контекста выполнения,
   которые в настоящее время используются совместно с другими процессами.
   Основное использование <span class="function"><strong>pcntl_unshare()</strong></span> заключается в том,
   чтобы позволить процессу управлять своим общим контекстом выполнения без создания нового процесса.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-unshare-parameters">
  <h3 class="title">Список параметров</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">flags</code></dt>
     <dd>
      <p class="para">
       Параметр <code class="parameter">flags</code> - это битовая маска, определяющая, какие части контекста выполнения должны быть неразделёнными.
       Параметр задаётся путём использования оператора OR вместе с нулём или более констант <code class="literal">CLONE_*</code>:
       <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">Возвращаемые значения</h3>
  <p class="para">
   Возвращает <code class="literal">0</code> в случае успешного выполнения, <code class="literal">-1</code> в противном случае.
   В случае возникновения ошибки устанавливается код ошибки,
   который можно получить с помощью функции <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">Смотрите также</h3>
  <p class="para">
   <ul class="simplelist">
    <li><a href="pcntl.constants.php#pcntl.constants.clone" class="link">Константы PCNTL</a></li>
    <li><span class="function"><a href="function.pcntl-get-last-error.php" class="function" rel="rdfs-seeAlso">pcntl_get_last_error()</a> - Извлекает номер ошибки, который установила последняя функция модуля pcntl, которая завершилась ошибкой</span></li>
   </ul>
  </p>
 </div>


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