downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

Our source is open

The syntax highlighted source is automatically generated by PHP from the plaintext script. If you're interested in what's behind the several functions we used, you can always take a look at the source of the following files:

Of course, if you want to see the source of this page, we have it available. You can also browse the SVN repository for this website on svn.php.net.

Source of: /manual/en/function.pcntl-getpriority.php

<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = 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 => 'en',
  ),
 
'this' =>
  array (
   
0 => 'function.pcntl-getpriority.php',
   
1 => 'pcntl_getpriority',
  ),
 
'up' =>
  array (
   
0 => 'ref.pcntl.php',
   
1 => 'PCNTL Functions',
  ),
 
'prev' =>
  array (
   
0 => 'function.pcntl-fork.php',
   
1 => 'pcntl_fork',
  ),
 
'next' =>
  array (
   
0 => 'function.pcntl-setpriority.php',
   
1 => 'pcntl_setpriority',
  ),
);
$setup["toc"] = $TOC;
$setup["parents"] = $PARENTS;
manual_setup($setup);

manual_header();
?>
<div id="function.pcntl-getpriority" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">pcntl_getpriority</h1>
  <p class="verinfo">(PHP 5)</p><p class="refpurpose"><span class="refname">pcntl_getpriority</span> &mdash; <span class="dc-title">Get the priority of any process</span></p>

 </div>
 
 <a name="function.pcntl-getpriority.description"></a><div class="refsect1 description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">int</span> <span class="methodname"><b>pcntl_getpriority</b></span>
    ([ <span class="methodparam"><span class="type">int</span> <tt class="parameter">$pid</tt><span class="initializer"> = getmypid()</span></span>
   [, <span class="methodparam"><span class="type">int</span> <tt class="parameter">$process_identifier</tt><span class="initializer"> = PRIO_PROCESS</span></span>
  ]] )</div>

  <p class="para rdfs-comment">
   <b>pcntl_getpriority()</b> gets the priority of
   <i><tt class="parameter">pid</tt></i>
. Because priority levels can differ between
   system types and kernel versions, please see your system&#039;s getpriority(2)
   man page for specific details.
  </p>
 </div>


 <a name="function.pcntl-getpriority.parameters"></a><div class="refsect1 parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   </p><dl>

    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">pid</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       If not specified, the pid of the current process is used.
      </p>
     </dd>

   
    <dt class="varlistentry">

     <span class="term"><i><tt class="parameter">process_identifier</tt></i>
</span>

     </dt><dd class="listitem">

      <p class="para">
       One of <b><tt class="constant">PRIO_PGRP</tt></b>, <b><tt class="constant">PRIO_USER</tt></b>
       or <b><tt class="constant">PRIO_PROCESS</tt></b>.
      </p>
     </dd>

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


 <a name="function.pcntl-getpriority.returnvalues"></a><div class="refsect1 returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   <b>pcntl_getpriority()</b> returns the priority of the process
   or <b><tt class="constant">FALSE</tt></b> on error.  A lower numerical value causes more favorable
   scheduling.
  </p>
  <div class="warning"><b class="warning">Warning</b><p class="simpara">This function may
return Boolean <b><tt class="constant">FALSE</tt></b>, but may also return a non-Boolean value which
evaluates to <b><tt class="constant">FALSE</tt></b>, such as <i>0</i> or
&quot;&quot;. Please read the section on <a href="language.types.boolean.php" class="link">Booleans</a> for more
information. Use <a href="language.operators.comparison.php" class="link">the ===
operator</a> for testing the return value of this
function.</p></div>
 </div>


 <a name="function.pcntl-getpriority.seealso"></a><div class="refsect1 seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   </p><ul class="simplelist">
    <li class="member"><a href="function.pcntl-setpriority.php" class="function" rel="rdfs-seeAlso">pcntl_setpriority()</a> - Change the priority of any process</li>
   </ul><p>
  </p>
 </div>


</div><?php manual_footer(); ?>
 
show source | credits | sitemap | contact | advertising | mirror sites