<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/ref.posix.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'function.posix-setrlimit.php',
    1 => 'posix_setrlimit',
    2 => 'システムリソース制限を設定',
  ),
  'up' => 
  array (
    0 => 'ref.posix.php',
    1 => 'POSIX 関数',
  ),
  'prev' => 
  array (
    0 => 'function.posix-setpgid.php',
    1 => 'posix_setpgid',
  ),
  'next' => 
  array (
    0 => 'function.posix-setsid.php',
    1 => 'posix_setsid',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'ja',
    'path' => 'reference/posix/functions/posix-setrlimit.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="function.posix-setrlimit" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">posix_setrlimit</h1>
  <p class="verinfo">(PHP 7, PHP 8)</p><p class="refpurpose"><span class="refname">posix_setrlimit</span> &mdash; <span class="dc-title">システムリソース制限を設定</span></p>

 </div>
 
 <div class="refsect1 description" id="refsect1-function.posix-setrlimit-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>posix_setrlimit</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$resource</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$soft_limit</code></span>, <span class="methodparam"><span class="type"><a href="language.types.integer.php" class="type int">int</a></span> <code class="parameter">$hard_limit</code></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>posix_setrlimit()</strong></span> は、
   指定されたシステムリソースに対してソフトリミットおよびハードリミットを設定します。
  </p>
  
<p class="para">
  各リソースには、それぞれソフトリミットとハードリミットがあります。
  ソフトリミットとは、そのリソースに対してカーネルが課す制限値のことです。
  ハードリミットとは、ソフトリミットの上限値のことです。
  特権を持たないプロセスは、ソフトリミットの値を 0 からハードリミット値の間で設定することが可能です。
  また、ハードリミットの値を下げることもできます。
</p>

 </div>


 <div class="refsect1 parameters" id="refsect1-function.posix-setrlimit-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">
   <dl>
    
     <dt><code class="parameter">resource</code></dt>
     <dd>
      <p class="para">
       設定されるリミットに対応する<a href="posix.constants.setrlimit.php" class="link">リソースリミット定数</a>です。
      </p>
     </dd>
    
    
     <dt><code class="parameter">soft_limit</code></dt>
     <dd>
      <p class="para">
       ソフトリミット、単位は、リソース制限が必要とする任意の単位です。または、
       <strong><code><a href="posix.constants.setrlimit.php#constant.posix-rlimit-infinity">POSIX_RLIMIT_INFINITY</a></code></strong> です。
      </p>
     </dd>
    
    
     <dt><code class="parameter">hard_limit</code></dt>
     <dd>
      <p class="para">
       ハードリミット、単位は、リソース制限が必要とする任意の単位です。または、
       <strong><code><a href="posix.constants.setrlimit.php#constant.posix-rlimit-infinity">POSIX_RLIMIT_INFINITY</a></code></strong> です。
      </p>
     </dd>
    
   </dl>
  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.posix-setrlimit-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   成功した場合に <strong><code><a href="reserved.constants.php#constant.true">true</a></code></strong> を、失敗した場合に <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> を返します。
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.posix-setrlimit-seealso">
  <h3 class="title">参考</h3>
  <p class="para">
   <ul class="simplelist">
    <li>man ページ SETRLIMIT(2)</li>
    <li><span class="function"><a href="function.posix-getrlimit.php" class="function" rel="rdfs-seeAlso">posix_getrlimit()</a> - システムリソース制限に関する情報を返す</span></li>
   </ul>
  </p>
 </div>


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