<?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 => 'uk',
  ),
  'this' => 
  array (
    0 => 'function.pcntl-sigprocmask.php',
    1 => 'pcntl_sigprocmask',
    2 => 'Sets and retrieves blocked signals',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'Функції PCNTL',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-signal-get-handler.php',
    1 => 'pcntl_signal_get_handler',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-sigtimedwait.php',
    1 => 'pcntl_sigtimedwait',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pcntl/functions/pcntl-sigprocmask.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-sigprocmask" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_sigprocmask</h1>
  <p class="verinfo">(PHP 5 &gt;= 5.3.0, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pcntl_sigprocmask</span> &mdash; <span class="dc-title">Sets and retrieves blocked signals</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.pcntl-sigprocmask-description">
  <h3 class="title">Опис</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_sigprocmask</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter">$signals</code></span>, <span class="methodparam"><span class="type"><a href="language.types.array.php" class="type array">array</a></span> <code class="parameter reference">&$old_signals</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><a href="language.types.boolean.php" class="type bool">bool</a></span></div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>pcntl_sigprocmask()</strong></span> function adds, removes or sets blocked
   signals, depending on the <code class="parameter">mode</code> parameter.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-sigprocmask-parameters">
  <h3 class="title">Параметри</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       Sets the behavior of <span class="function"><strong>pcntl_sigprocmask()</strong></span>. Possible
       values: 
       <ul class="simplelist">
        <li><strong><code><a href="pcntl.constants.php#constant.sig-block">SIG_BLOCK</a></code></strong>: Add the signals to the
         currently blocked signals.</li>
        <li><strong><code><a href="pcntl.constants.php#constant.sig-unblock">SIG_UNBLOCK</a></code></strong>: Remove the signals from the
         currently blocked signals.</li>
        <li><strong><code><a href="pcntl.constants.php#constant.sig-setmask">SIG_SETMASK</a></code></strong>: Replace the currently
         blocked signals by the given list of signals.</li>
       </ul>
      </p>
     </dd>
    
    
     <dt><code class="parameter">signals</code></dt>
     <dd>
      <p class="para">
       List of signals.
      </p>
     </dd>
    
    
     <dt><code class="parameter">old_signals</code></dt>
     <dd>
      <p class="para">
       The <code class="parameter">old_signals</code> parameter is set to an array
       containing the list of the previously blocked signals.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pcntl-sigprocmask-returnvalues">
  <h3 class="title">Значення, що повертаються</h3>
  <p class="para">
   Повертає <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> у разі успіху або <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> в разі помилки.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.pcntl-sigprocmask-changelog">
  <h3 class="title">Журнал змін</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Версія</th>
      <th>Опис</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.4.0</td>
      <td>
       A <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown if <code class="parameter">signal</code>
       is empty.
      </td>
     </tr>

     <tr>
      <td>8.4.0</td>
      <td>
       A <span class="classname"><a href="class.typeerror.php" class="classname">TypeError</a></span> is thrown if <code class="parameter">signal</code>
       value is not an <span class="type"><a href="language.types.integer.php" class="type int">int</a></span>.
      </td>
     </tr>

     <tr>
      <td>8.4.0</td>
      <td>
       A <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown if <code class="parameter">signal</code>
       value is invalid.
      </td>
     </tr>

     <tr>
      <td>8.4.0</td>
      <td>
       A <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown if <code class="parameter">mode</code>
       value is not <strong><code><a href="pcntl.constants.php#constant.sig-block">SIG_BLOCK</a></code></strong>, <strong><code><a href="pcntl.constants.php#constant.sig-unblock">SIG_UNBLOCK</a></code></strong> or
       <strong><code><a href="pcntl.constants.php#constant.sig-setmask">SIG_SETMASK</a></code></strong>.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.pcntl-sigprocmask-examples">
  <h3 class="title">Приклади</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Приклад #1 <span class="function"><strong>pcntl_sigprocmask()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />pcntl_sigprocmask</span><span style="color: #007700">(</span><span style="color: #0000BB">SIG_BLOCK</span><span style="color: #007700">, array(</span><span style="color: #0000BB">SIGHUP</span><span style="color: #007700">));<br /></span><span style="color: #0000BB">$oldset </span><span style="color: #007700">= array();<br /></span><span style="color: #0000BB">pcntl_sigprocmask</span><span style="color: #007700">(</span><span style="color: #0000BB">SIG_UNBLOCK</span><span style="color: #007700">, array(</span><span style="color: #0000BB">SIGHUP</span><span style="color: #007700">), </span><span style="color: #0000BB">$oldset</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-function.pcntl-sigprocmask-seealso">
  <h3 class="title">Прогляньте також</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.pcntl-sigwaitinfo.php" class="function" rel="rdfs-seeAlso">pcntl_sigwaitinfo()</a> - Waits for signals</span></li>
    <li><span class="function"><a href="function.pcntl-sigtimedwait.php" class="function" rel="rdfs-seeAlso">pcntl_sigtimedwait()</a> - Waits for signals, with a timeout</span></li>
   </ul>
  </p>
 </div>


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