<?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 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.pcntl-getpriority.php',
    1 => 'pcntl_getpriority',
    2 => 'プロセスの優先度を取得する',
  ),
  'up' => 
  array (
    0 => 'ref.pcntl.php',
    1 => 'PCNTL 関数',
  ),
  'prev' => 
  array (
    0 => 'function.pcntl-getcpuaffinity.php',
    1 => 'pcntl_getcpuaffinity',
  ),
  'next' => 
  array (
    0 => 'function.pcntl-getqos-class.php',
    1 => 'pcntl_getqos_class',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/pcntl/functions/pcntl-getpriority.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.pcntl-getpriority" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_getpriority</h1>
  <p class="verinfo">(PHP 5, PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">pcntl_getpriority</span> &mdash; <span class="dc-title">プロセスの優先度を取得する</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.pcntl-getpriority-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>pcntl_getpriority</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="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"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="para rdfs-comment">
   <span class="function"><strong>pcntl_getpriority()</strong></span> は、
   <code class="parameter">process_id</code>
   の優先度を設定します。システムの型やカーネルの
   バージョンによって優先度の扱いは違うので、詳細についてはシステムの
   getpriority(2) の man ページを参照ください。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.pcntl-getpriority-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">process_id</code></dt>
     <dd>
      <p class="para">
       <strong><code><a href="reserved.constants.php#constant.null">null</a></code></strong> だった場合は、現在のプロセスの プロセスID を使用します。
      </p>
     </dd>
    
    
     <dt><code class="parameter">mode</code></dt>
     <dd>
      <p class="para">
       <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>、
       <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-getpriority-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   <span class="function"><strong>pcntl_getpriority()</strong></span> はプロセスの優先度を返します。
   エラー時には <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。数字が小さいほど、優先順位は上となります。
  </p>
  <div class="warning"><strong class="warning">警告</strong><p class="simpara">この関数は論理値
<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返す可能性がありますが、<strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> として評価される値を返す可能性もあります。
詳細については <a href="language.types.boolean.php" class="link">論理値</a>の
セクションを参照してください。この関数の返り値を調べるには
<a href="language.operators.comparison.php" class="link">===演算子</a> を
使用してください。</p></div>
 </div>


 <div class="refsect1 changelog" id="refsect1-function.pcntl-getpriority-changelog">
  <h3 class="title">変更履歴</h3>
  <table class="doctable informaltable">
   
    <thead>
     <tr>
      <th>バージョン</th>
      <th>説明</th>
     </tr>

    </thead>

    <tbody class="tbody">
     <tr>
      <td>8.0.0</td>
      <td>
       <code class="parameter">process_id</code> は、nullable になりました。
      </td>
     </tr>

    </tbody>
   
  </table>

 </div>


 <div class="refsect1 seealso" id="refsect1-function.pcntl-getpriority-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li><span class="function"><a href="function.pcntl-setpriority.php" class="function" rel="rdfs-seeAlso">pcntl_setpriority()</a> - プロセスの優先度を変更する</span></li>
   </ul>
  </p>
 </div>


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