<?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-signal-get-handler.php',
    1 => 'pcntl_signal_get_handler',
    2 => 'Get the current handler for specified signal',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'PCNTL Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-signal-dispatch.php',
    1 => 'pcntl_signal_dispatch',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-sigprocmask.php',
    1 => 'pcntl_sigprocmask',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pcntl/functions/pcntl-signal-get-handler.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-signal-get-handler" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_signal_get_handler</h1>
  <p class="verinfo">(PHP 7 &gt;= 7.1.0, PHP 8)</p><p class="refpurpose"><span class="refname">pcntl_signal_get_handler</span> &mdash; <span class="dc-title">Get the current handler for specified signal</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pcntl-signal-get-handler-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_signal_get_handler</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$signal</code></span>): <span class="type"><span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span>|<span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span></div>

  <p class="para rdfs-comment">
   The <span class="function"><strong>pcntl_signal_get_handler()</strong></span> function will get the current handler for the specified <code class="parameter">signal</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-signal-get-handler-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">signal</code></dt>
    <dd>
     <p class="para">
      The signal number.
     </p>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pcntl-signal-get-handler-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   This function may return an integer value that refers to <strong><code><a href="pcntl.constants.php#constant.sig-dfl">SIG_DFL</a></code></strong> or <strong><code><a href="pcntl.constants.php#constant.sig-ign">SIG_IGN</a></code></strong>.
   If a custom handler has been set, that <span class="type"><a href="language.types.callable.php" class="type callable">callable</a></span> is returned.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.pcntl-signal-get-handler-changelog">
  <h3 class="title">Changelog</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>Version</th>
      <th>Beschreibung</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>7.1.0</td>
      <td>
       <span class="function"><strong>pcntl_signal_get_handler()</strong></span> has been added.
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 examples" id="refsect1-function.pcntl-signal-get-handler-examples">
  <h3 class="title">Beispiele</h3>
  <p class="para">
   <div class="example" id="example-1">
    <p><strong>Beispiel #1 <span class="function"><strong>pcntl_signal_get_handler()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">pcntl_signal_get_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Outputs: int(0)<br /><br /></span><span style="color: #007700">function </span><span style="color: #0000BB">pcntl_test</span><span style="color: #007700">(</span><span style="color: #0000BB">$signo</span><span style="color: #007700">) {}<br /></span><span style="color: #0000BB">pcntl_signal</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">, </span><span style="color: #DD0000">'pcntl_test'</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">pcntl_signal_get_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Outputs: string(10) "pcntl_test"<br /><br /></span><span style="color: #0000BB">pcntl_signal</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">, </span><span style="color: #0000BB">SIG_DFL</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">pcntl_signal_get_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Outputs: int(0)<br /><br /></span><span style="color: #0000BB">pcntl_signal</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">, </span><span style="color: #0000BB">SIG_IGN</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">pcntl_signal_get_handler</span><span style="color: #007700">(</span><span style="color: #0000BB">SIGUSR1</span><span style="color: #007700">)); </span><span style="color: #FF8000">// Outputs: int(1)<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

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


 <div class="refsect1 seealso" id="refsect1-function.pcntl-signal-get-handler-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.pcntl-signal.php" class="function" rel="rdfs-seeAlso">pcntl_signal()</a> - Richtet eine Signalverarbeitung ein</span></li>
  </ul>
 </div>


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