ulimit

Section: C Library Functions (3)
Updated: 2026-02-08
Index JM Home Page roff page
 

名前

ulimit - ユーザー制限を取得・設定する  

ライブラリ

標準 C ライブラリ (libc,~-lc)  

書式

#include <ulimit.h>

[[deprecated]] long ulimit(int cmd, long newlimit);
 

説明

Warning: this routine is obsolete. Use getrlimit(2), setrlimit(2), and sysconf(3) instead. For the shell command ulimit, see bash(1).

ulimit() は呼び出し元のプロセスに関する制限のいくつかを取得・設定する。 cmd 引数には、以下の値のうちのどれか一つを与えることができる。

UL_GETFSIZE
ファイルサイズに関する制限を返す。単位は 512 バイト。
UL_SETFSIZE
ファイルサイズに関する制限を設定する。
3
(Linux では実装されていない) データセグメントで指定できるアドレスの最大値を返す。
4
(実装されているが、対応するシンボリックな定数は存在しない) プロセスがオープンできるファイル数の最大値を返す。
 

返り値

On success, ulimit() returns a nonnegative value. On error, -1 is returned, and errno is set to indicate the error.  

エラー

EPERM
非特権プロセスが制限値を増加させようとした。
 

属性

この節で使用されている用語の説明については、 attributes(7) を参照。
インターフェース属性値
ulimit() Thread safetyMT-Safe
 

標準規格

POSIX.1-2008.  

歴史

SVr4, POSIX.1-2001. POSIX.1-2008 はこれを廃止予定としている。  

関連項目

bash(1), getrlimit(2), setrlimit(2), sysconf(3)


 

Index

名前
ライブラリ
書式
説明
返り値
エラー
属性
標準規格
歴史
関連項目

This document was created by man2html, using the manual pages.