<?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-setpriority.php',
    1 => 'pcntl_setpriority',
    2 => '&Auml;ndert die Priorit&auml;t eines beliebigen Prozesses',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'PCNTL Funktionen',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-setcpuaffinity.php',
    1 => 'pcntl_setcpuaffinity',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-setqos-class.php',
    1 => 'pcntl_setqos_class',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'de',
    'path' => 'reference/pcntl/functions/pcntl-setpriority.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-setpriority" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_setpriority</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pcntl_setpriority</span> &mdash; <span class="dc-title">Ändert die Priorität eines beliebigen Prozesses</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.pcntl-setpriority-description">
  <h3 class="title">Beschreibung</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_setpriority</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$priority</code></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="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$mode</code><span class="initializer"> = <strong><code><a href="pcntl.constants.php#constant.prio-process">PRIO_PROCESS</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">
   <span class="function"><strong>pcntl_setpriority()</strong></span> setzt die Priorität von
   <code class="parameter">process_id</code>.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-setpriority-parameters">
  <h3 class="title">Parameter-Liste</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">priority</code></dt>
     <dd>
      <p class="para">
       <code class="parameter">priority</code> ist gewöhnlich ein Wert im Bereich
       zwischen <code class="literal">-20</code> und <code class="literal">20</code>. Die
       vorgegebene Priorität ist <code class="literal">0</code>, während ein kleinerer
       numerischer Wert günstigeres Scheduling hervorruft. Weil die
       Prioritätsstufen sich zwischen Systemtypen und Kernelversionen
       unterscheiden können, ist die setpriority(2)-Manpage des Systems
       bezüglich spezifischer Details zu konsultieren.
      </p>
     </dd>
    
    
     <dt><code class="parameter">process_id</code></dt>
     <dd>
      <p class="para">
       Falls <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>, wird die PID des aktuellen Prozesses verwendet.
      </p>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       Entweder <strong><code><a href="pcntl.constants.php#constant.prio-pgrp">PRIO_PGRP</a></code></strong>, <strong><code><a href="pcntl.constants.php#constant.prio-user">PRIO_USER</a></code></strong>,
       <strong><code><a href="pcntl.constants.php#constant.prio-process">PRIO_PROCESS</a></code></strong>, <strong><code><a href="pcntl.constants.php#constant.prio-darwin-bg">PRIO_DARWIN_BG</a></code></strong>
       oder <strong><code><a href="pcntl.constants.php#constant.prio-darwin-thread">PRIO_DARWIN_THREAD</a></code></strong>.
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.pcntl-setpriority-returnvalues">
  <h3 class="title">Rückgabewerte</h3>
  <p class="para">
   Gibt bei Erfolg <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> zurück. Bei einem Fehler wird <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> zurückgegeben.
  </p>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.pcntl-setpriority-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>8.0.0</td>
      <td>
       <code class="parameter">process_id</code> ist jetzt nullable (akzeptiert den
       <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong>-Wert).
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.pcntl-setpriority-seealso">
  <h3 class="title">Siehe auch</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.pcntl-getpriority.php" class="function" rel="rdfs-seeAlso">pcntl_getpriority()</a> - Ermittelt die Priorit&auml;t eines beliebigen Prozesses</span></li>
    <li><span class="function"><strong>pcntl_setpriority()</strong></span></li>
   </ul>
  </p>
 </div>


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