<?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-getcpuaffinity.php',
    1 => 'pcntl_getcpuaffinity',
    2 => 'Get the cpu affinity of a process',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'PCNTL Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-get-last-error.php',
    1 => 'pcntl_get_last_error',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-getpriority.php',
    1 => 'pcntl_getpriority',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/pcntl/functions/pcntl-getcpuaffinity.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-getcpuaffinity" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_getcpuaffinity</h1>
  <p class="verinfo">(PHP 8 &gt;= 8.4.0)</p><p class="refpurpose"><span class="refname">pcntl_getcpuaffinity</span> &mdash; <span class="dc-title">Get the cpu affinity of a process</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pcntl-getcpuaffinity-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_getcpuaffinity</strong></span>(<span class="methodparam"><span class="type"><span class="type"><a href="language.types.null.php" class="type null">?</a></span><span class="type"><a href="language.types.integer.php" class="type int">int</a></span></span> <code class="parameter">$process_id</code><span class="initializer"> = <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong></span></span>): <span class="type"><span class="type"><a href="language.types.array.php" class="type array">array</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   Retrieve the cpu affinity of the <code class="parameter">process_id</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-getcpuaffinity-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <dl>
   
    <dt><code class="parameter">process_id</code></dt>
    <dd>
     <span class="simpara">
      If <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, the current process ID is used.
     </span>
    </dd>
   
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pcntl-getcpuaffinity-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="simpara">
   Returns the cpu affinity mask of the process, Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben..
  </p>
  <div class="warning"><strong class="warning">Warnung</strong><p class="simpara">Diese Funktion kann sowohl das
boolsche <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückliefern, als auch einen nicht-boolschen Wert, welcher zu <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> ausgewertet wird.
Weitere Informationen entnehmen Sie bitte dem Abschnitt über die
<a href="language.types.boolean.php" class="link"> boolschen Typen</a>. Benutzen Sie deshalb
<a href="language.operators.comparison.php" class="link">den === Operator</a>,
um den Rückgabewert dieser Funktion zu überprüfen.</p></div>
 </div>


 <div class="refsect1 errors" id="refsect1-function.pcntl-getcpuaffinity-errors">
  <h3 class="title">Fehler/Exceptions</h3>
  <p class="simpara">
   A <span class="classname"><a href="class.valueerror.php" class="classname">ValueError</a></span> is thrown when
   <code class="parameter">process_id</code> is an invalid process id
   or the cpu mask had failed to be created.
  </p>
  <p class="simpara">
   If <code class="parameter">process_id</code> is a process for which the current
   user has no allowed permission, a <strong><code><a href="errorfunc.constants.php#constant.e-warning">E_WARNING</a></code></strong>
   is emitted.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.pcntl-getcpuaffinity-seealso">
  <h3 class="title">Siehe auch</h3>
  <ul class="simplelist">
   <li><span class="function"><a href="function.pcntl-setcpuaffinity.php" class="function" rel="rdfs-seeAlso">pcntl_setcpuaffinity()</a> - Set the cpu affinity of a process</span></li>
  </ul>
 </div>


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