OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man2 / getrlimit.2
index e495054..e4377b8 100644 (file)
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH GETRLIMIT 2 2013\-02\-11 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
+.\"         all rights reserved.
+.\" Translated 1997-02-22, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated and Modified 2001-06-02, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated and Modified 2001-08-18, Yuichi SATO
+.\" Updated and Modified 2002-08-25, Yuichi SATO
+.\" Updated and Modified 2004-01-17, Yuichi SATO
+.\" Updated and Modified 2004-12-30, Yuichi SATO
+.\" Updated and Modified 2005-09-10, Yuichi SATO
+.\" Updated and Modified 2005-10-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated and Modified 2005-10-27, Akihiro MOTOKI
+.\" Updated and Modified 2006-04-15, Akihiro MOTOKI, Catch up to LDP v2.29
+.\" Updated 2008-08-08, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2008-10-13, Akihiro MOTOKI, LDP v3.11
+.\" Updated 2013-05-01, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-07-22, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH GETRLIMIT 2 2014\-01\-22 Linux "Linux Programmer's Manual"
 .SH 名前
 getrlimit, setrlimit, prlimit \- 資源の制限を取得/設定する
 .SH 書式
@@ -173,7 +192,7 @@ ID にロックされる 共有メモリセグメント (\fBshmget\fP(2)  を参
 .fi
 ここで \fIattr\fP は \fImq_attr\fP 構造体であり、 \fBmq_open\fP(3)  の第 4 引き数として指定される。
 
-\fIsizeof(struct msg_msg *)\fP (Linux/i386 では 4 バイト) を含む最初の加数は、 ユーザーが長さ 0
+\fIsizeof(struct msg_msg\ *)\fP (Linux/i386 では 4 バイト) を含む最初の加数は、 ユーザーが長さ 0
 のメッセージを無制限に作れないこと保証している (このようなメッセージであっても、 記録のためのオーバーヘッドでシステムメモリを消費する)。
 .TP 
 \fBRLIMIT_NICE\fP (Linux 2.6.12 以降, 下記の「バグ」の節も参照)
@@ -234,29 +253,24 @@ Linux 2.6.23 以降では、この制限はプロセスのコマンドライン
 .\" commit c022a0acad534fd5f5d5f17280f6d4d135e74e81
 .\" Author: Jiri Slaby <jslaby@suse.cz>
 .\" Date:   Tue May 4 18:03:50 2010 +0200
-The Linux\-specific \fBprlimit\fP()  system call combines and extends the
-functionality of \fBsetrlimit\fP()  and \fBgetrlimit\fP().  It can be used to both
-set and get the resource limits of an arbitrary process.
+Linux 固有の \fBprlimit\fP() システムコールは、 \fBsetrlimit\fP() と \fBgetrlimit\fP
+の機能を合わせて拡張したものである。 このシステムコールを使って、任意のプロセスのリソース上限の設定と取得を行うことができる。
 
-The \fIresource\fP argument has the same meaning as for \fBsetrlimit\fP()  and
-\fBgetrlimit\fP().
+\fIresource\fP 引き数は \fBsetrlimit\fP() や \fBgetrlimit\fP() と同じ意味である。
 
-If the \fInew_limit\fP argument is a not NULL, then the \fIrlimit\fP structure to
-which it points is used to set new values for the soft and hard limits for
-\fIresource\fP.  If the \fIold_limit\fP argument is a not NULL, then a successful
-call to \fBprlimit\fP()  places the previous soft and hard limits for
-\fIresource\fP in the \fIrlimit\fP structure pointed to by \fIold_limit\fP.
+\fInew_limit\fP 引き数が NULL 以外の場合、 \fInew_limit\fP が指す \fIrlimit\fP 構造体を使って \fIresource\fP
+のソフトリミットとハードリミットの新しい値が設定される。 \fIold_limit\fP 引き数が NULL 以外の場合、 \fBprlimit\fP()
+の呼び出しが成功すると、 \fIresource\fP の直前のソフトリミットとハードリミットが \fIold_limit\fP が指す \fIrlimit\fP
+構造体に格納される。
 
 .\" FIXME this permission check is strange
 .\" Asked about this on LKML, 7 Nov 2010
 .\"     "Inconsistent credential checking in prlimit() syscall"
-The \fIpid\fP argument specifies the ID of the process on which the call is to
-operate.  If \fIpid\fP is 0, then the call applies to the calling process.  To
-set or get the resources of a process other than itself, the caller must
-have the \fBCAP_SYS_RESOURCE\fP capability, or the real, effective, and saved
-set user IDs of the target process must match the real user ID of the caller
-\fIand\fP the real, effective, and saved set group IDs of the target process
-must match the real group ID of the caller.
+\fIpid\fP 引き数は呼び出しの操作対象となるプロセス ID を指定する。 \fIpid\fP が 0
+の場合、呼び出しは呼び出し元プロセスに対して適用される。 自分以外のプロセスのリソースの設定と取得を行うためには、 呼び出し元プロセスが
+\fBCAP_SYS_RESOURCE\fP ケーパビリティを持っているか、 対象となるプロセスの実ユーザ ID、 実効ユーザ ID、 保存
+set\-user\-ID が呼び出し元プロセスの実ユーザ ID と一致し、 かつ、 対象となるプロセスの実グループ ID、 実効グループ ID、 保存
+set\-group\-ID が呼び出し元プロセスの実グループ ID と一致していなければならない。
 .SH 返り値
 成功した場合、これらのシステムコールは 0 を返す。
 エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
@@ -279,14 +293,14 @@ must match the real group ID of the caller.
 設定する許可を持っていなかった。
 .TP 
 \fBESRCH\fP
-Could not find a process with the ID specified in \fIpid\fP.
+\fIpid\fP で指定された ID のプロセスが見つからなかった。
 .SH バージョン
-The \fBprlimit\fP()  system call is available since Linux 2.6.36.  Library
-support is available since glibc 2.13.
+\fBprlimit\fP() システムコールは Linux 2.6.36 以降で利用できる。 ライブラリのサポートは glibc 2.13
+以降で利用できる。
 .SH 準拠
 \fBgetrlimit\fP(), \fBsetrlimit\fP(): SVr4, 4.3BSD, POSIX.1\-2001.
 .br
-\fBprlimit\fP(): Linux\-specific.
+\fBprlimit\fP(): Linux 固有。
 
 \fBRLIMIT_MEMLOCK\fP と \fBRLIMIT_NPROC\fP は BSD から派生し、
 POSIX.1\-2001 には指定されていない。
@@ -299,11 +313,14 @@ POSIX.1\-2001 には指定されていない。
 \fBfork\fP(2)  で作成された作成された子プロセスは、 親プロセスのリソース制限を継承する。 \fBexecve\fP(2)
 の前後でリソース制限は保存される。
 
+リソースのソフトリミットをそのプロセスが現在のリソース使用量より小さい値に設定することはできる
+(但し、そのプロセスはそれ以降そのリソースの使用量を増やすことができなくなる)。
+
 シェルのリソース制限は、シェルの組み込みコマンドである \fIulimit\fP (\fBcsh\fP(1)  では \fIlimit )\fP
 を使って設定することができる。 このシェルのリソース制限は、コマンドを実行してシェルが生成するプロセス に引き継がれる。
 
-Since Linux 2.6.24, the resource limits of any process can be inspected via
-\fI/proc/[pid]/limits\fP; see \fBproc\fP(5).
+Linux 2.6.24 以降では、 プロセスのリソース上限は \fI/proc/[pid]/limits\fP で知ることができる。 \fBproc\fP(5)
+参照。
 
 古いシステムでは、 \fBsetrlimit\fP()  と同様の目的を持つ関数 \fBvlimit\fP()  が提供されていた。 後方互換性のため、glibc
 でも \fBvlimit\fP()  を提供している。 全ての新しいアプリケーションでは、 \fBsetrlimit\fP()  を使用すべきである。
@@ -337,21 +354,17 @@ Since Linux 2.6.24, the resource limits of any process can be inspected via
 .\" Date: 2005-01-23 23:27:46 GMT
 .\" Tested Solaris 10, FreeBSD 9, OpenBSD 5.0
 .\" FIXME https://bugzilla.kernel.org/show_bug.cgi?id=50951
-Since Linux 2.6.12, if a process reaches its soft \fBRLIMIT_CPU\fP limit and
-has a handler installed for \fBSIGXCPU\fP, then, in addition to invoking the
-signal handler, the kernel increases the soft limit by one second.  This
-behavior repeats if the process continues to consume CPU time, until the
-hard limit is reached, at which point the process is killed.  Other
-implementations do not change the \fBRLIMIT_CPU\fP soft limit in this manner,
-and the Linux behavior is probably not standards conformant; portable
-applications should avoid relying on this Linux\-specific behavior.  The
-Linux\-specific \fBRLIMIT_RTTIME\fP limit exhibits the same behavior when the
-soft limit is encountered.
+Linux 2.6.12 以降では、 プロセスがその \fBRLIMIT_CPU\fP ソフトリミットに達し、 \fBSIGXCPU\fP
+に対してシグナルハンドラが設定されている場合、 シグナルハンドラを起動するだけでなく、 カーネルは 1 秒間ソフトリミットを増やす。 そのプロセスが
+CPU 時間を消費し続けている限り、 ハードリミットに達するまで、この動作が繰り返される。 ハードリミットに達すると、その時点でプロセスは kill
+される。 他の実装では、上記のような \fBRLIMIT_CPU\fP ソフトリミットの変更は行われず、 おそらく Linux の動作は標準に準拠していない。
+移植性が必要なアプリケーションではこの Linux 固有の動作を前提にするのは避けるべきである。 Linux 固有の上限
+\fBRLIMIT_RTTIME\fP でも、 ソフトリミットに達した場合に同じ動作となる。
 
 2.4.22 より前のカーネルでは、 \fIrlim\->rlim_cur\fP が \fIrlim\->rlim_max\fP より大きかった場合、
 \fBsetrlimit\fP()  での \fBEINVAL\fP エラーを検出できない。
 .SH 例
-The program below demonstrates the use of \fBprlimit\fP().
+以下のプログラムに \fBprlimit\fP() の使用例を示す。
 .PP
 .nf
 #define _GNU_SOURCE
@@ -411,6 +424,6 @@ main(int argc, char *argv[])
 \fBshmctl\fP(2), \fBmalloc\fP(3), \fBsigqueue\fP(3), \fBulimit\fP(3), \fBcore\fP(5),
 \fBcapabilities\fP(7), \fBsignal\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。