From: Akihiro MOTOKI Date: Mon, 14 Oct 2013 11:43:45 +0000 (+0900) Subject: (split) LDP: Update draft pages X-Git-Tag: LDP-3.54-final~7 X-Git-Url: http://git.osdn.net/view?p=linuxjm%2FLDP_man-pages.git;a=commitdiff_plain;h=dd489528aa994f27146acb2bde2db87452ba6e14 (split) LDP: Update draft pages --- diff --git a/draft/man1/intro.1 b/draft/man1/intro.1 index 917f0ec5..d0e80738 100644 --- a/draft/man1/intro.1 +++ b/draft/man1/intro.1 @@ -153,10 +153,8 @@ PS1="What next, master? " と設定すると、 プロンプトはそのよう / \-name tel" としても 同じことを行うが、検索は木の根 (/) から開始される。 数 GB のディスクに対して検索をかけると時間がかかるので、 そのようなときは \fBlocate\fP(1) を使った方がいいかもしれない。 .SS ディスクとファイルシステム -The command \fImount\fP will attach the filesystem found on some disk (or -floppy, or CDROM or so) to the big filesystem hierarchy. And \fIumount\fP -detaches it again. The command \fIdf\fP will tell you how much of your disk is -still free. +\fImount\fP コマンドは、(フロッピーや CDROM などの) ディスク上のファイルシステムを 大きなファイルシステム階層に接続する。逆に +\fIumount\fP コマンドは切り離しを行う。 \fIdf\fP コマンドを実行すると、ディスクの未使用量がどの程度かを表示する。 .SS プロセス UNIX システムでは、多くのユーザプロセスとシステムプロセスが同時に実行される。 対話的に実行できるプロセスは \fIforeground\fP で実行されており、そうでないものは \fIbackground\fP で実行されている。 コマンド \fIps\fP diff --git a/draft/man2/acct.2 b/draft/man2/acct.2 index 4cdf7028..563a6da9 100644 --- a/draft/man2/acct.2 +++ b/draft/man2/acct.2 @@ -109,7 +109,7 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 (capability) が必要である。 .TP \fBEROFS\fP -\fIfilename\fP refers to a file on a read\-only filesystem. +読み込みだけのファイルシステム上のファイルを \fIfilename\fP が参照している。 .TP \fBEUSERS\fP 使用可能なファイル構造体がないか、メモリが足りない。 diff --git a/draft/man2/clone.2 b/draft/man2/clone.2 index aae0e317..eedbf579 100644 --- a/draft/man2/clone.2 +++ b/draft/man2/clone.2 @@ -161,16 +161,14 @@ wake (起床) させる。 このアドレスは \fBset_tid_address\fP(2) シ オープン・クローズや、ファイルディスクリプタ・フラグの変更) を行っても、もう一方のプロセスには影響を与えない。 .TP \fBCLONE_FS\fP (Linux 2.0 以降) -If \fBCLONE_FS\fP is set, the caller and the child process share the same -filesystem information. This includes the root of the filesystem, the -current working directory, and the umask. Any call to \fBchroot\fP(2), -\fBchdir\fP(2), or \fBumask\fP(2) performed by the calling process or the child -process also affects the other process. - -If \fBCLONE_FS\fP is not set, the child process works on a copy of the -filesystem information of the calling process at the time of the \fBclone\fP() -call. Calls to \fBchroot\fP(2), \fBchdir\fP(2), \fBumask\fP(2) performed later by -one of the processes do not affect the other process. +\fBCLONE_FS\fP が設定された場合、呼び出し元のプロセスと子プロセスが同じファイル・システム +情報を共有する。ファイル・システム情報は、ファイル・システムのルート (root)、 カレント・ワーキング・ディレクトリ (current +working directory) や umask などである。 呼び出し元のプロセスや子プロセスのどちらか一方によって \fBchroot\fP(2), +\fBchdir\fP(2), \fBumask\fP(2) が呼び出されると、もう一方のプロセスにも影響が及ぶ。 + +\fBCLONE_FS\fP が設定されていない場合、子プロセスは、 \fBclone\fP() +が実行された時点での、呼び出し元のプロセスのファイル・システム情報のコピーを 使用する。 これ以降は、呼び出し元のプロセスと子プロセスの一方が +\fBchroot\fP(2), \fBchdir\fP(2), \fBumask\fP(2) を呼び出しても、もう一方のプロセスには影響を与えない。 .TP \fBCLONE_IO\fP (Linux 2.6.25 以降) \fBCLONE_IO\fP が設定された場合、新しいプロセスは呼び出し元のプロセスと I/O コンテキストを共有する。 diff --git a/draft/man2/getrusage.2 b/draft/man2/getrusage.2 index f9b57a32..f6adbb05 100644 --- a/draft/man2/getrusage.2 +++ b/draft/man2/getrusage.2 @@ -145,10 +145,10 @@ I/O 動作を必要とするページフォルトの回数。 このフィールドは現在のところ Linux では未使用である。 .TP \fIru_inblock\fP (Linux 2.6.22 以降) -The number of times the filesystem had to perform input. +ファイルシステムが入力を実行する必要があった回数。 .TP \fIru_oublock\fP (Linux 2.6.22 以降) -The number of times the filesystem had to perform output. +ファイルシステムが出力を実行する必要があった回数。 .TP \fIru_msgsnd\fP (メンテナンスされていない) .\" On FreeBSD 6.2, this appears to measure messages sent over sockets diff --git a/draft/man2/getxattr.2 b/draft/man2/getxattr.2 index 23212436..b7cddf88 100644 --- a/draft/man2/getxattr.2 +++ b/draft/man2/getxattr.2 @@ -56,9 +56,8 @@ getxattr, lgetxattr, fgetxattr \- 拡張属性の値を取得する これらは、システム上のすべての inode に関連付けられた通常の属性 (\fBstat\fP(2) が返すデータ) を拡張するものである。 拡張属性のコンセプトは \fBattr\fP(5) に書かれている。 .PP -\fBgetxattr\fP() retrieves the \fIvalue\fP of the extended attribute identified -by \fIname\fP and associated with the given \fIpath\fP in the filesystem. The -length of the attribute \fIvalue\fP is returned. +\fBgetxattr\fP() は、ファイルシステム内の指定された \fIpath\fP に対応する、名前 \fIname\fP の拡張属性の \fIvalue\fP +(値) を取得する。 属性 \fIvalue\fP の長さが返される。 .PP \fBlgetxattr\fP() は \fBgetxattr\fP() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル ではなく、リンクそのものの情報を取得する点だけが異なる。 @@ -84,7 +83,7 @@ inode に対して、互いに独立な名前空間が複数あってもよい \fI\fP で \fBENODATA\fP の同義語として定義されている)。 .TP \fBENOTSUP\fP -Extended attributes are not supported by the filesystem, or are disabled. +拡張属性がそのファイルシステムでサポートされていない、 もしくは無効になっている。 .TP \fBERANGE\fP \fIvalue\fP バッファの大きさ \fIsize\fP が結果を保持するのに十分な大きさでなかった。 diff --git a/draft/man2/ioprio_set.2 b/draft/man2/ioprio_set.2 index b18a760e..fcd73ba0 100644 --- a/draft/man2/ioprio_set.2 +++ b/draft/man2/ioprio_set.2 @@ -123,9 +123,8 @@ glibc はこれらのシステムコールに対するラッパー関数を提 I/O スケジューラの選択はデバイス単位に行われ、その選択は スペシャルファイル \fI/sys/block//queue/scheduler\fP 経由で行われる。 -One can view the current I/O scheduler via the \fI/sys\fP filesystem. For -example, the following command displays a list of all schedulers currently -loaded in the kernel: +現在の I/O スケジューラは \fI/sys\fP ファイルシステム経由で参照できる。例えば、以下のコマンドを実行すると、 +現在カーネルでロードされているスケジューラの全リストが表示される。 .sp .RS .nf diff --git a/draft/man2/kcmp.2 b/draft/man2/kcmp.2 index 069f5992..862cc135 100644 --- a/draft/man2/kcmp.2 +++ b/draft/man2/kcmp.2 @@ -61,9 +61,8 @@ kcmp \- 二つのプロセスが同じカーネルリソースを共有してい 二つのプロセスが同じオープンファイル記述の集合を共有しているかを検査する。 引き数 \fIidx1\fP と \fIidx2\fP は無視される。 .TP \fBKCMP_FS\fP -Check whether the processes share the same filesystem information (i.e., -file mode creation mask, working directory, and filesystem root). The -arguments \fIidx1\fP and \fIidx2\fP are ignored. +二つのプロセスが同じファイルシステム情報 (すなわち、ファイルのモード作成マスク、作業ディレクトリ、ファイルシステムのルート) +を共有しているかを検査する。 引き数 \fIidx1\fP と \fIidx2\fP は無視される。 .TP \fBKCMP_IO\fP 二つのプロセスが I/O コンテキストを共有しているかを検査する。 引き数 \fIidx1\fP と \fIidx2\fP は無視される。 @@ -121,12 +120,10 @@ arguments \fIidx1\fP and \fIidx2\fP are ignored. .SH 注意 glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2) を使って呼び出すこと。 -This system call is available only if the kernel was configured with -\fBCONFIG_CHECKPOINT_RESTORE\fP. The main use of the system call is for the -checkpoint/restore in user space (CRIU) feature. The alternative to this -system call would have been to expose suitable process information via the -\fBproc\fP(5) filesystem; this was deemed to be unsuitable for security -reasons. +このシステムコールが利用できるのは、 カーネルの \fBCONFIG_CHECKPOINT_RESTORE\fP オプションが有効になっている場合だけである。 +このシステムコールの主な用途は、 ユーザ空間でのチェックポイント/リストア (checkpoint/restore in user space; +CRIU) 機能である。 このシステムコールを使わないとすると、 \fBproc\fP(5) ファイルシステム経由で必要なプロセス情報を公開することになるが、 +これはセキュリティ上の理由から不適切とみなされた。 このページで参照されている共有リソースに関する背景についての情報は \fBclone\fP(2) を参照のこと。 .SH 関連項目 diff --git a/draft/man2/listxattr.2 b/draft/man2/listxattr.2 index 7294668b..bad3d7c0 100644 --- a/draft/man2/listxattr.2 +++ b/draft/man2/listxattr.2 @@ -53,13 +53,11 @@ listxattr, llistxattr, flistxattr \- 拡張属性の名前リストを得る これらは、システム上のすべての inode に関連付けられた通常の属性 (\fBstat\fP(2) が返すデータ) を拡張するものである。 拡張属性のコンセプトは \fBattr\fP(5) に書かれている。 .PP -\fBlistxattr\fP() retrieves the list of extended attribute names associated -with the given \fIpath\fP in the filesystem. The retrieved list is placed in -\fIlist\fP, a caller\-allocated buffer whose size (in bytes) is specified in the -argument \fIsize\fP. The list is the set of (null\-terminated) names, one after -the other. Names of extended attributes to which the calling process does -not have access may be omitted from the list. The length of the attribute -name \fIlist\fP is returned. +\fBlistxattr\fP() は、ファイルシステム内の指定された \fIpath\fP に対応する拡張属性の名前リストを取得する。取得したリストは +\fIlist\fP に格納される。 \fIlist\fP は呼び出し側で確保するバッファで、引き数 \fIsize\fP でバッファのサイズを (バイト単位で) +指定する。リストは名前の集合で、 NULL +終端された文字列が連続して並んでいる。呼び出したプロセスがアクセスする権限のない拡張属性の名前は、リストに含まれない。拡張属性の名前の \fIlist\fP +の長さが返される。 .PP \fBllistxattr\fP() は \fBlistxattr\fP() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル ではなく、リンクそのものの拡張属性の名前リストを取得する点だけが異なる。 @@ -99,7 +97,7 @@ system.posix_acl_access\e0system.posix_acl_default\e0 .SH エラー .TP \fBENOTSUP\fP -Extended attributes are not supported by the filesystem, or are disabled. +拡張属性がそのファイルシステムでサポートされていない、 もしくは無効になっている。 .TP \fBERANGE\fP \fIlist\fP バッファの大きさ \fIsize\fP が結果を保持するのに十分な大きさでなかった。 diff --git a/draft/man2/mknod.2 b/draft/man2/mknod.2 index cb04fbd2..3ae25971 100644 --- a/draft/man2/mknod.2 +++ b/draft/man2/mknod.2 @@ -50,9 +50,8 @@ _BSD_SOURCE || _SVID_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOP .RE .ad .SH 説明 -The system call \fBmknod\fP() creates a filesystem node (file, device special -file or named pipe) named \fIpathname\fP, with attributes specified by \fImode\fP -and \fIdev\fP. +システムコール \fBmknod\fP() は \fIpathname\fP という名前のファイルシステム・ノード +(ファイル、デバイススペシャルファイル、名前付きパイプ) を、 属性 \fImode\fP と \fIdev\fP の指定にしたがって作成する。 \fImode\fP 引き数には、作成するノードの許可属性 (permission) とタイプを指定する。 \fImode\fP の指定は以下にあげるファイルタイプのうちの 1 つと、 許可属性の組合せ (ビットごとの OR を使用) で行う。 @@ -71,11 +70,10 @@ and \fIdev\fP. \fIpathname\fP が既に存在する場合、またはシンボリックリンクの場合、 この呼び出しは \fBEEXIST\fP エラーで失敗する。 -The newly created node will be owned by the effective user ID of the -process. If the directory containing the node has the set\-group\-ID bit set, -or if the filesystem is mounted with BSD group semantics, the new node will -inherit the group ownership from its parent directory; otherwise it will be -owned by the effective group ID of the process. +新しく作成されたノードの所有者はプロセスの実効ユーザ ID にセットされる。 新たに作られたノードを保持する 親ディレクトリの set\-group\-ID +ビットがセットされていたり、 ファイルシステムが BSD のグループセマンティクスにしたがって +マウントされている場合には、新しいノードのグループ所有権は親ディレクトリの グループ所有権を継承する (親ディレクトリと同じになる)。 +また、そうでなかった場合の所有グループはプロセスの実効グループ ID となる。 .SH 返り値 \fBmknod\fP() は成功した場合 0 を、失敗した場合 \-1 を返す (失敗した場合 \fIerrno\fP がエラーの内容にしたがってセットされる)。 .SH エラー @@ -85,8 +83,7 @@ owned by the effective group ID of the process. (\fBpath_resolution\fP(7) も参照すること)。 .TP \fBEDQUOT\fP -The user's quota of disk blocks or inodes on the filesystem has been -exhausted. +ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。 .TP \fBEEXIST\fP \fIpathname\fP がすでに存在する。 これには \fIpathname\fP がシンボリックリンクである場合も含まれる @@ -120,14 +117,12 @@ exhausted. .\" For UNIX domain sockets and regular files, EPERM is returned only in .\" Linux 2.2 and earlier; in Linux 2.4 and later, unprivileged can .\" use mknod() to make these files. -\fImode\fP requested creation of something other than a regular file, FIFO -(named pipe), or UNIX domain socket, and the caller is not privileged -(Linux: does not have the \fBCAP_MKNOD\fP capability); also returned if the -filesystem containing \fIpathname\fP does not support the type of node -requested. +\fImode\fP は通常のファイル・FIFO (名前付きパイプ)・UNIX ドメインソケット以外を 作成するようにセットされているが、実行者が特権 +(Linux では \fBCAP_MKNOD\fP ケーパビリティ (capability)) を持っていない。 または \fIpathname\fP +を保持するファイルシステムが、指定されたノード形式をサポートしていない。 .TP \fBEROFS\fP -\fIpathname\fP refers to a file on a read\-only filesystem. +\fIpathname\fP が読み出し専用ファイルシステム上のファイルを指している。 .SH 準拠 .\" The Linux version differs from the SVr4 version in that it .\" does not require root permission to create pipes, also in that no diff --git a/draft/man2/mount.2 b/draft/man2/mount.2 index bc0e6ac4..2671f739 100644 --- a/draft/man2/mount.2 +++ b/draft/man2/mount.2 @@ -178,7 +178,7 @@ Linux 2.4 以降、ひとつのファイルシステムを複数のマウント で提供される機能のサブセットを提供する。つまり、 \fBMS_NOATIME\fP では \fBMS_NODIRATIME\fP が暗黙のうち設定される。 .TP \fBMS_NOEXEC\fP -.\" (Possibly useful for a file system that contains non-Linux executables. +.\" (Possibly useful for a filesystem that contains non-Linux executables. .\" Often used as a security feature, e.g., to make sure that restricted .\" users cannot execute files uploaded using ftp or so.) このファイルシステムにあるプログラムの実行を許可しない。 @@ -330,6 +330,6 @@ Linux 独自のファイル \fI/proc/PID/mounts\fP では、指定された ID \fBumount\fP(2), \fBnamespaces\fP(7), \fBpath_resolution\fP(7), \fBmount\fP(8), \fBumount\fP(8) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/removexattr.2 b/draft/man2/removexattr.2 index 44746bf6..d15ea4cf 100644 --- a/draft/man2/removexattr.2 +++ b/draft/man2/removexattr.2 @@ -53,8 +53,7 @@ removexattr, lremovexattr, fremovexattr \- 拡張属性を削除する これらは、システム上のすべての inode に関連付けられた通常の属性 (\fBstat\fP(2) が返すデータ) を拡張するものである。 拡張属性のコンセプトは \fBattr\fP(5) に書かれている。 .PP -\fBremovexattr\fP() removes the extended attribute identified by \fIname\fP and -associated with the given \fIpath\fP in the filesystem. +\fBremovexattr\fP() は、ファイルシステム内の指定された \fIpath\fP に対応する、名前 \fIname\fP の拡張属性を削除する。 .PP \fBlremovexattr\fP() は \fBremovexattr\fP() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル ではなく、リンクそのものの情報を削除する点だけが異なる。 @@ -73,7 +72,7 @@ inode に対し、互いに独立な名前空間が複数あってもよい。 の同義語として定義されている。) .TP \fBENOTSUP\fP -Extended attributes are not supported by the filesystem, or are disabled. +拡張属性がそのファイルシステムでサポートされていない、 もしくは無効になっている。 .PP 上記に加えて、 \fBstat\fP(2) に書かれているエラーが発生する場合もある。 .SH バージョン diff --git a/draft/man2/sched_setaffinity.2 b/draft/man2/sched_setaffinity.2 index 69336ce3..6ef00d93 100644 --- a/draft/man2/sched_setaffinity.2 +++ b/draft/man2/sched_setaffinity.2 @@ -46,9 +46,9 @@ .\" Updated & Modified 2006-07-14, Akihiro MOTOKI, LDP v2.34 .\" Updated & Modified 2008-12-24, Akihiro MOTOKI, LDP v3.14 .\" -.TH SCHED_SETAFFINITY 2 2013\-02\-11 Linux "Linux Programmer's Manual" +.TH SCHED_SETAFFINITY 2 2013\-09\-17 Linux "Linux Programmer's Manual" .SH 名前 -sched_setaffinity, sched_getaffinity \- プロセスの CPU affinity マスクを設定・取得する +sched_setaffinity, sched_getaffinity \- スレッドの CPU affinity マスクを設定・取得する .SH 書式 .nf \fB#define _GNU_SOURCE\fP /* feature_test_macros(7) 参照 */ @@ -61,24 +61,24 @@ sched_setaffinity, sched_getaffinity \- プロセスの CPU affinity マスク \fB cpu_set_t *\fP\fImask\fP\fB);\fP .fi .SH 説明 -プロセスの CPU affinity (親和度) マスクは、そのプロセスが 実行を許可されている CPU の集合を決定する。 +スレッドの CPU affinity (親和度) マスクは、そのスレッドが 実行を許可されている CPU の集合を決定する。 マルチプロセッサ・システムでは、CPU affinity マスクを設定することで 性能上のメリットを得られる可能性がある。 -例えば、特定のプロセスを一つの CPU に括り付け (すなわち、そのプロセスの affinity マスクを一つの CPU に設定し)、 -他の全てのプロセスの affinity マスクからその CPU を除外することで、 確実にそのプロセスの実行速度を最大にすることができる。 -また、あるプロセスの実行を一つの CPU に限定することで、 一つの CPU での実行を停止してから別の CPU で実行を再開するときに発生する +例えば、特定のスレッドを一つの CPU に括り付け (すなわち、そのスレッドの affinity マスクを一つの CPU に設定し)、 +他の全てのスレッドの affinity マスクからその CPU を除外することで、 確実にそのスレッドの実行速度を最大にすることができる。 +また、あるスレッドの実行を一つの CPU に限定することで、 一つの CPU での実行を停止してから別の CPU で実行を再開するときに発生する キャッシュ無効化 (cache invalidation) による性能面の劣化を避けることもできる。 CPU affinity マスクは「CPU の集合」を表す \fIcpu_set_t\fP 構造体で表現され、 \fIcpu_set_t\fP へのポインタ \fImask\fP で指定される。 CPU 集合を操作するためのマクロ群については \fBCPU_SET\fP(3) で記載されている。 -\fBsched_setaffinity\fP() は、プロセスID が \fIpid\fP のプロセスの CPU affinity マスクを \fImask\fP -で指定された値に設定する。 \fIpid\fP が 0 の場合、呼び出し元プロセスが使われる。 \fIcpusetsize\fP 引き数には \fImask\fP +\fBsched_setaffinity\fP() は、スレッド ID が \fIpid\fP のスレッドの CPU affinity マスクを \fImask\fP +で指定された値に設定する。 \fIpid\fP が 0 の場合、呼び出し元スレッドが使われる。 \fIcpusetsize\fP 引き数には \fImask\fP が指すデータの長さ (バイト単位) である。 通常は、この引き数には \fIsizeof(cpu_set_t)\fP を指定すればよい。 -\fIpid\fP で指定されたプロセスが \fImask\fP で指定された CPU のいずれかで現在実行されていない場合、 そのプロセスは \fImask\fP +\fIpid\fP で指定されたスレッドが \fImask\fP で指定された CPU のいずれかで現在実行されていない場合、 そのスレッドは \fImask\fP で指定された CPU のいずれかに移動される。 -\fBsched_getaffinity\fP() は、 プロセスID が \fIpid\fP のプロセスの affinity マスクを \fImask\fP が指す +\fBsched_getaffinity\fP() は、 スレッド ID が \fIpid\fP のスレッドの affinity マスクを \fImask\fP が指す \fIcpu_set_t\fP 構造体に書き込む。 \fIcpusetsize\fP 引き数には \fImask\fP の (バイト単位の) 大きさを指定する。 .SH 返り値 成功した場合、 \fBsched_setaffinity\fP() と \fBsched_getaffinity\fP() は 0 を返す。 エラーの場合は @@ -89,7 +89,7 @@ CPU affinity マスクは「CPU の集合」を表す \fIcpu_set_t\fP 構造体 指定されたメモリ番地が不正である。 .TP \fBEINVAL\fP -システム上に現在実際に存在し、かつ "cpuset" 機構が課す制限においてそのプロセスに対して許可されている プロセッサが、 affinity +システム上に現在実際に存在し、かつ "cpuset" 機構が課す制限においてそのスレッドに対して許可されている プロセッサが、 affinity ビットマスク \fImask\fP に含まれていない。 "cpuset" 機構については \fBcpuset\fP(7) を参照。 .TP \fBEINVAL\fP @@ -97,12 +97,12 @@ CPU affinity マスクは「CPU の集合」を表す \fIcpu_set_t\fP 構造体 \fIcpusetsize\fP がカーネルで使われている affinity マスクのサイズより小さい。 .TP \fBEPERM\fP -(\fBsched_setaffinity\fP()) 呼び出し元のプロセスに適切な特権がなかった。 呼び出し元は、実効ユーザ ID が \fIpid\fP -で識別されるプロセスの実ユーザ ID または実効ユーザ ID と同じであるか、 \fBCAP_SYS_NICE\fP ケーパビリティ (capability) +(\fBsched_setaffinity\fP()) 呼び出し元のスレッドに適切な特権がなかった。 呼び出し元は、実効ユーザ ID が \fIpid\fP +で識別されるスレッドの実ユーザ ID または実効ユーザ ID と同じであるか、 \fBCAP_SYS_NICE\fP ケーパビリティ (capability) を持たなければならない。 .TP \fBESRCH\fP -プロセス ID \fIpid\fP のプロセスが見つからなかった。 +ID が \fIpid\fP のスレッドが見つからなかった。 .SH バージョン CPU affinity システムコールは Linux kernel 2.5.8 で導入された。 これらのシステムコールのラッパー関数は glibc 2.3 で導入された。 最初は、glibc のインタフェースには \fIunsigned int\fP 型の \fIcpusetsize\fP 引き数が入っていた。 @@ -110,15 +110,15 @@ glibc 2.3.3 では \fIcpusetsize\fP 引き数が削除されたが、glibc 2.3.4 .SH 準拠 これらのシステムコールは Linux 固有である。 .SH 注意 -\fBsched_setaffinity\fP() を呼び出した後は、プロセスが実際に実行される CPU の集合は、 \fImask\fP +\fBsched_setaffinity\fP() を呼び出した後は、スレッドが実際に実行される CPU の集合は、 \fImask\fP 引き数で指定された集合と、システム上に実際に存在する CPU の集合の 共通集合 (AND) となる。 "cpuset" -機構が使用されている場合には、プロセスが動作する CPU 集合 に対してシステムはさらに制限を加えるかもしれない ("cpuset" 機構については -\fBcpuset\fP(7) を参照)。 プロセスが動作する実際の CPU 集合に対する制限はカーネルにより 暗黙のうちに適用される。 +機構が使用されている場合には、スレッドが動作する CPU 集合 に対してシステムはさらに制限を加えるかもしれない ("cpuset" 機構については +\fBcpuset\fP(7) を参照)。 スレッドが動作する実際の CPU 集合に対する制限はカーネルにより 暗黙のうちに適用される。 \fBsched_setscheduler\fP(2) に Linux のスケジューリング方式についての説明 がある。 .PP -実際には affinity マスクはスレッド単位の属性で、スレッドグループの 各スレッド単位に独立して調整することができる。 \fBgettid\fP(2) +affinity マスクはスレッド単位の属性で、スレッドグループの 各スレッド単位に独立して調整することができる。 \fBgettid\fP(2) コールからの返り値をこのコールの \fIpid\fP 引き数として渡すことができる。 \fIpid\fP に 0 を指定すると呼び出し元のスレッドの属性が設定され、 \fBgetpid\fP(2) コールからの返り値を \fIpid\fP に指定するとスレッドグループのメインスレッドの属性が設定される (POSIX スレッド API を使用している場合、 \fBsched_setaffinity\fP() の代わりに \fBpthread_setaffinity_np\fP(3) @@ -141,6 +141,6 @@ API を使用している場合、 \fBsched_setaffinity\fP() の代わりに \f \fBCPU_SET\fP(3), \fBpthread_setaffinity_np\fP(3), \fBsched_getcpu\fP(3), \fBcapabilities\fP(7), \fBcpuset\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/sched_setparam.2 b/draft/man2/sched_setparam.2 index 7f7ad575..bdd45cf2 100644 --- a/draft/man2/sched_setparam.2 +++ b/draft/man2/sched_setparam.2 @@ -66,10 +66,9 @@ sched_setparam, sched_getparam \- スケジューリング・パラメータの \fBsched_getparam\fP() は \fIpid\fP で指定されたプロセスのスケジューリング・パラメータを取得する。 \fIpid\fP が 0 ならば、呼び出し元のプロセスのパラメータを取得する。 -\fBsched_setparam\fP() checks the validity of \fIparam\fP for the scheduling -policy of the thread. The value \fIparam\->sched_priority\fP must lie -within the range given by \fBsched_get_priority_min\fP(2) and -\fBsched_get_priority_max\fP(2). +\fBsched_setparam\fP() はスレッドのスケジューリング方針における \fIparam\fP の妥当性をチェックする。 +\fIparam\->sched_priority\fP の値は \fBsched_get_priority_min\fP(2) と +\fBsched_get_priority_max\fP(2) の範囲に入っていなければならない。 スケジューリングの優先度と方針に関連する特権とリソース制限の 議論に関しては \fBsched_setscheduler\fP(2) を参照のこと。 diff --git a/draft/man2/sched_setscheduler.2 b/draft/man2/sched_setscheduler.2 index c118e407..9af9c7b1 100644 --- a/draft/man2/sched_setscheduler.2 +++ b/draft/man2/sched_setscheduler.2 @@ -65,7 +65,7 @@ .\" Updated 2013-05-01, Akihiro MOTOKI .\" Updated 2013-05-06, Akihiro MOTOKI .\" -.TH SCHED_SETSCHEDULER 2 2013\-02\-12 Linux "Linux Programmer's Manual" +.TH SCHED_SETSCHEDULER 2 2013\-09\-17 Linux "Linux Programmer's Manual" .SH 名前 sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシーとパラメータを設定/取得する .SH 書式 @@ -85,8 +85,8 @@ sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシ };\fP .fi .SH 説明 -\fBsched_setscheduler\fP() は \fIpid\fP で指定された ID を持つプロセスのスケジューリング・ポリシーや -それに関連するパラメータを設定する。\fIpid\fP が 0 の場合は 呼び出したプロセスのスケジューリング・ポリシーとパラメータが設定される。 引き数 +\fBsched_setscheduler\fP() は \fIpid\fP で指定された ID を持つスレッドのスケジューリング・ポリシーや +それに関連するパラメータを設定する。\fIpid\fP が 0 の場合は 呼び出したスレッドのスケジューリング・ポリシーとパラメータが設定される。 引き数 \fIparam\fP の解釈は選択されたポリシーによる。 現在のところ、Linux では 以下に示す「通常」(リアルタイムでない) スケジューリング・ポリシーが サポートされている。 .TP 14 @@ -101,7 +101,7 @@ sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシ \fBSCHED_IDLE\fP 「非常に」低い優先度で動作するバックグラウンド・ジョブ用。 .PP -どの実行可能プロセスを選択するかについて、より正確な制御を必要とする 時間の制約が厳しい特別なアプリケーション用として、 +どの実行可能スレッドを選択するかについて、より正確な制御を必要とする 時間の制約が厳しい特別なアプリケーション用として、 以下の「リアルタイム」ポリシーもサポートされている。 .TP 14 \fBSCHED_FIFO\fP @@ -113,59 +113,59 @@ sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシ これらのポリシーのそれぞれの動作については以下で説明する。 .\" -\fBsched_getscheduler\fP() は \fIpid\fP で識別されるプロセスに現在適用されている -スケジューリング・ポリシーを尋ねる。\fIpid\fP が 0 ならば、呼び出した プロセス自身のスケジューリング・ポリシーが返される。 +\fBsched_getscheduler\fP() は \fIpid\fP で識別されるスレッドに現在適用されている +スケジューリング・ポリシーを尋ねる。\fIpid\fP が 0 ならば、呼び出した スレッド自身のスケジューリング・ポリシーが返される。 .SS "スケジューリング・ポリシー (scheduling policy)" -スケジューラ (scheduler) とはカーネルの構成要素で、 次に CPU で実行される実行可能なプロセスを決定するものである。 -各々のプロセスには、スケジューリング・ポリシーと 「静的」なスケジューリング優先度 \fIsched_priority\fP が対応付けられ、 これらの設定は -\fBsched_setscheduler\fP() で変更できる。 スケジューラは、システム上の全プロセスのスケジューリング・ポリシーと +スケジューラ (scheduler) とはカーネルの構成要素で、 次に CPU で実行される実行可能なスレッドを決定するものである。 +各々のスレッドには、スケジューリング・ポリシーと 「静的」なスケジューリング優先度 \fIsched_priority\fP が対応付けられ、 これらの設定は +\fBsched_setscheduler\fP() で変更できる。 スケジューラは、システム上の全スレッドのスケジューリング・ポリシーと 静的優先度に関する知識に基づいて決定を行う。 通常のスケジューリング・ポリシー (\fBSCHED_OTHER\fP, \fBSCHED_IDLE\fP, \fBSCHED_BATCH\fP) -の下でスケジューリングされるプロセスでは、 \fIsched_priority\fP はスケジューリングの決定に使用されない +の下でスケジューリングされるスレッドでは、 \fIsched_priority\fP はスケジューリングの決定に使用されない (\fIsched_priority\fP には 0 を指定しなければならない)。 -リアルタイム・スケジューリング・ポリシー (\fBSCHED_FIFO\fP, \fBSCHED_RR\fP) の下でスケジューリングされるプロセスは、 +リアルタイム・スケジューリング・ポリシー (\fBSCHED_FIFO\fP, \fBSCHED_RR\fP) の下でスケジューリングされるスレッドは、 \fIsched_priority\fP の値は 1 (最低) から 99 (最高) の範囲となる -(数字から分かるように、リアルタイム・プロセスは常に通常のプロセスよりも 高い優先度を持つ)。 ここで注意すべきなのは、POSIX.1\-2001 +(数字から分かるように、リアルタイム・スレッドは常に通常のスレッドよりも 高い優先度を持つ)。 ここで注意すべきなのは、POSIX.1\-2001 が要求しているのは、 リアルタイム・ポリシーの実装において最低 32 種類の異なる優先度レベルが サポートされることだけであり、いくつかのシステムではこの最低限の数の 優先度しか提供されていない、ということである。 移植性が必要なプログラムでは、 \fBsched_get_priority_min\fP(2) と \fBsched_get_priority_max\fP(2) を使って、あるポリシーがサポートする優先度の範囲を調べるべきである。 -概念としては、 スケジューラはその \fIsched_priority\fP の値それぞれに対して 実行可能なプロセスのリストを管理している。 -どのプロセスを次に実行するかを決定するために、 スケジューラは静的優先度の最も高い空でないリストを探して、 そのリストの先頭のプロセスを選択する。 +概念としては、 スケジューラはその \fIsched_priority\fP の値それぞれに対して 実行可能なスレッドのリストを管理している。 +どのスレッドを次に実行するかを決定するために、 スケジューラは静的優先度の最も高い空でないリストを探して、 そのリストの先頭のスレッドを選択する。 -各プロセスのスケジューリング・ポリシーは、 そのプロセスが同じ静的優先度を持つプロセスのリストの中のどこに挿入され、 +各スレッドのスケジューリング・ポリシーは、 そのスレッドが同じ静的優先度を持つスレッドのリストの中のどこに挿入され、 このリストの中をどのように移動するかを決定する。 -全てのスケジューリングはプリエンプティブ (preemptive) である: より高い優先度のプロセスが実行可能になると、現在実行中のプロセスは実行権を -取り上げられ (preempted)、そのプロセスの静的優先度レベルの待ちリストに 戻される。スケジューリング・ポリシーは同じ静的優先度を持つ実行可能な -プロセスのリストの中で順番のみを決定する。 +全てのスケジューリングはプリエンプティブ (preemptive) である: より高い優先度のスレッドが実行可能になると、現在実行中のスレッドは実行権を +取り上げられ (preempted)、そのスレッドの静的優先度レベルの待ちリストに 戻される。スケジューリング・ポリシーは同じ静的優先度を持つ実行可能な +スレッドのリストの中で順番のみを決定する。 .SS "SCHED_FIFO: ファーストイン・ファーストアウト・スケジューリング" \fBSCHED_FIFO\fP は 0 より大きな静的優先度でのみ使用できる。このポリシーでは、 \fBSCHED_FIFO\fP -プロセスが実行可能になった場合、 そのポリシーが \fBSCHED_OTHER\fP、 \fBSCHED_BATCH\fP、 \fBSCHED_IDLE\fP の -現在実行中のプロセスは直ちに実行権を取り上げられる。 \fBSCHED_FIFO\fP は時分割のない単純なスケジューリング・アルゴリズムである。 -\fBSCHED_FIFO\fP ポリシーでスケジューリングされているプロセスには以下の ルールが適用される: +スレッドが実行可能になった場合、 そのポリシーが \fBSCHED_OTHER\fP、 \fBSCHED_BATCH\fP、 \fBSCHED_IDLE\fP の +現在実行中のスレッドは直ちに実行権を取り上げられる。 \fBSCHED_FIFO\fP は時分割のない単純なスケジューリング・アルゴリズムである。 +\fBSCHED_FIFO\fP ポリシーでスケジューリングされているスレッドには以下の ルールが適用される: .IP * 3 -より高い優先度の他のプロセスによって取って代わられた \fBSCHED_FIFO\fP プロセスはその優先度のリストの先頭に留まり続け、 -より高い優先度のプロセス全てが停止 (block) した場合に実行を再開する。 +より高い優先度の他のスレッドによって取って代わられた \fBSCHED_FIFO\fP スレッドはその優先度のリストの先頭に留まり続け、 +より高い優先度のスレッド全てが停止 (block) した場合に実行を再開する。 .IP * -\fBSCHED_FIFO\fP プロセスが実行可能になった時、その優先度のリストの最後 に挿入される。 +\fBSCHED_FIFO\fP スレッドが実行可能になった時、その優先度のリストの最後 に挿入される。 .IP * -.\" In 2.2.x and 2.4.x, the process is placed at the front of the queue -.\" In 2.0.x, the Right Thing happened: the process went to the back -- MTK +.\" In 2.2.x and 2.4.x, the thread is placed at the front of the queue +.\" In 2.0.x, the Right Thing happened: the thread went to the back -- MTK \fBsched_setscheduler\fP() や \fBsched_setparam\fP(2) は \fIpid\fP で指定された -\fBSCHED_FIFO\fP (または \fBSCHED_RR\fP) プロセスが 実行可能な場合、リストの最初に置く。 -結果として、もし優先度が同じだった場合、 現在実行中のプロセスに先んじるかもしれない。 (POSIX.1\-2001 -ではプロセスはリストの最後に行くべきと規定されている。) +\fBSCHED_FIFO\fP (または \fBSCHED_RR\fP) スレッドが 実行可能な場合、リストの最初に置く。 +結果として、もし優先度が同じだった場合、 現在実行中のスレッドに先んじるかもしれない。 (POSIX.1\-2001 +ではスレッドはリストの最後に行くべきと規定されている。) .IP * -\fBsched_yield\fP(2) を呼び出したプロセスはリストの最後に置かれる。 +\fBsched_yield\fP(2) を呼び出したスレッドはリストの最後に置かれる。 .PP -その他のイベントによって \fBSCHED_FIFO\fP ポリシーで スケジューリングされるプロセスが同じ優先度の実行可能な -プロセスの待ちリストの中を移動することはない。 +その他のイベントによって \fBSCHED_FIFO\fP +ポリシーでスケジューリングされるスレッドが同じ優先度の実行可能なスレッドの待ちリストの中を移動することはない。 -\fBSCHED_FIFO\fP プロセスは I/O 要求によって停止するか、 より高い優先度のプロセスによって置きかえられるか、 +\fBSCHED_FIFO\fP スレッドは I/O 要求によって停止するか、 より高い優先度のスレッドによって置きかえられるか、 \fBsched_yield\fP(2) を呼び出すまで実行を続ける。 .SS "SCHED_RR: ラウンドロビン (round\-robin)・スケジューリング" .\" On Linux 2.4, the length of the RR interval is influenced @@ -173,25 +173,25 @@ sched_setscheduler, sched_getscheduler \- スケジューリング・ポリシ .\" \fBSCHED_RR\fP は \fBSCHED_FIFO\fP の単純な拡張である。 上述された \fBSCHED_FIFO\fP に関する記述は全て \fBSCHED_RR\fP に 適用できる。異なるのは -それぞれのプロセスは最大時間単位までしか実行できない ということである。 -\fBSCHED_RR\fP プロセスが時間単位と同じかそれより 長い時間実行されると、 -その優先度のリストの最後に置かれる。 より高い優先度のプロセスによって -置きかえられ、その後実行を再開した \fBSCHED_RR\fP プロセスは、そのラウンド +それぞれのスレッドは最大時間単位までしか実行できない ということである。 +\fBSCHED_RR\fP スレッドが時間単位と同じかそれより 長い時間実行されると、 +その優先度のリストの最後に置かれる。 より高い優先度のスレッドによって +置きかえられ、その後実行を再開した \fBSCHED_RR\fP スレッドは、そのラウンド ロビン時間単位を完全に使い切る まで実行される。その時間単位の長さは \fBsched_rr_get_interval\fP(2) を使って取得できる。 .SS "SCHED_OTHER: Linux のデフォルトの時分割スケジューリング" .\" \fBSCHED_OTHER\fP は静的優先度 0 でのみ使用できる。 \fBSCHED_OTHER\fP は Linux 標準の時分割スケジューラで、 -特別なリアルタイム機構を必要としていない全てのプロセスで使用される。 実行するプロセスは、静的優先度 0 のリストから、このリストの中だけで +特別なリアルタイム機構を必要としていない全てのスレッドで使用される。 実行するスレッドは、静的優先度 0 のリストから、このリストの中だけで 決定される「動的な」優先度 (dynamic priority) に基いて決定される。 動的な優先度は (\fBnice\fP(2) や \fBsetpriority\fP(2) により設定される) nice 値に基づいて決定されるもので、 -単位時間毎に、プロセスが実行可能だが、スケジューラにより実行が拒否された 場合にインクリメントされる。 これにより、全ての \fBSCHED_OTHER\fP -プロセスでの公平性が保証される。 +単位時間毎に、スレッドが実行可能だが、スケジューラにより実行が拒否された 場合にインクリメントされる。 これにより、全ての \fBSCHED_OTHER\fP +スレッドでの公平性が保証される。 .SS "SCHED_BATCH: バッチプロセスのスケジューリング" (Linux 2.6.16 以降) \fBSCHED_BATCH\fP は静的優先度 0 でのみ使用できる。 このポリシーは (nice 値に基づく) -動的な優先度にしたがってプロセスの スケジューリングが行われるという点で、\fBSCHED_OTHER\fP に似ている。 -異なるのは、このポリシーでは、プロセスが常に CPU に負荷のかかる (CPU\-intensive) 処理を行うと、スケジューラが仮定する点である。 -スケジューラはプロセスを呼び起こす毎にそのプロセスにスケジューリング上の ペナルティを少し課し、その結果、このプロセスはスケジューリングの決定で +動的な優先度にしたがってスレッドの スケジューリングが行われるという点で、\fBSCHED_OTHER\fP に似ている。 +異なるのは、このポリシーでは、スレッドが常に CPU に負荷のかかる (CPU\-intensive) 処理を行うと、スケジューラが仮定する点である。 +スケジューラはスレッドを呼び起こす毎にそのスレッドにスケジューリング上の ペナルティを少し課し、その結果、このスレッドはスケジューリングの決定で 若干冷遇されるようになる。 .\" The following paragraph is drawn largely from the text that @@ -215,51 +215,51 @@ Linux 2.6.32 以降では、 \fBsched_setscheduler\fP() を呼び出す際に \f より正確には、 \fBSCHED_RESET_ON_FORK\fP フラグが指定された場合、それ以降に作成される子プロセスに以下のルールが適用される。 .IP * 3 -呼び出したプロセスのスケジューリング・ポリシーが \fBSCHED_FIFO\fP か \fBSCHED_RR\fP の場合、子プロセスのポリシーは +呼び出したスレッドのスケジューリング・ポリシーが \fBSCHED_FIFO\fP か \fBSCHED_RR\fP の場合、子プロセスのポリシーは \fBSCHED_OTHER\fP にリセットされる。 .IP * 子プロセスが負の nice 値を持っている場合、子プロセスの nice 値は 0 にリセットされる。 .PP -一度 \fBSCHED_RESET_ON_FORK\fP フラグが有効にされた後は、このフラグをリセットできるのは、プロセスが \fBCAP_SYS_NICE\fP +一度 \fBSCHED_RESET_ON_FORK\fP フラグが有効にされた後は、このフラグをリセットできるのは、スレッドが \fBCAP_SYS_NICE\fP ケーパビリティを持つ場合だけである。このフラグは \fBfork\fP(2) で作成された子プロセスでは無効になる。 .\" \fBSCHED_RESET_ON_FORK\fP フラグは、 \fBsched_getscheduler\fP() が返すポリシー値で参照できる。 .SS 特権とリソース制限 -2.6.12 より前のバージョンの Linux カーネルでは、 特権プロセス (\fBCAP_SYS_NICE\fP ケーパビリティを持つプロセス) だけが -0 以外の静的優先度を設定する (すなわち、リアルタイム・スケジューリング・ポリシーを設定する) ことができる。 非特権プロセスができる変更は +2.6.12 より前のバージョンの Linux カーネルでは、 特権スレッド (\fBCAP_SYS_NICE\fP ケーパビリティを持つスレッド) だけが +0 以外の静的優先度を設定する (すなわち、リアルタイム・スケジューリング・ポリシーを設定する) ことができる。 非特権スレッドができる変更は \fBSCHED_OTHER\fP ポリシーを設定することだけであり、さらにこの変更を行えるのは \fBsched_setscheduler\fP() -の呼び出し元の実効ユーザ ID がポリシーの変更対象プロセス (\fIpid\fP で指定されたプロセス) の実ユーザ ID か実効ユーザ ID と +の呼び出し元の実効ユーザ ID がポリシーの変更対象スレッド (\fIpid\fP で指定されたスレッド) の実ユーザ ID か実効ユーザ ID と 一致する場合だけである。 Linux 2.6.12 以降では、リソース制限 \fBRLIMIT_RTPRIO\fP が定義されており、 スケジューリング・ポリシーが -\fBSCHED_RR\fP と \fBSCHED_FIFO\fP の場合の、非特権プロセスの静的優先度の上限を定めている。 +\fBSCHED_RR\fP と \fBSCHED_FIFO\fP の場合の、非特権スレッドの静的優先度の上限を定めている。 スケジューリング・ポリシーと優先度を変更する際のルールは以下の通りである。 .IP * 3 -非特権プロセスに 0 以外の \fBRLIMIT_RTPRIO\fP ソフト・リミットが設定されている場合、 -非特権プロセスはそのプロセスのスケジューリング・ポリシーと優先度を 変更できるが、優先度を現在の自身の優先度と \fBRLIMIT_RTPRIO\fP +非特権スレッドに 0 以外の \fBRLIMIT_RTPRIO\fP ソフト・リミットが設定されている場合、 +非特権スレッドはそのスレッドのスケジューリング・ポリシーと優先度を 変更できるが、優先度を現在の自身の優先度と \fBRLIMIT_RTPRIO\fP ソフト・リミットの大きい方よりも高い値に設定できないという制限が課される。 .IP * \fBRLIMIT_RTPRIO\fP ソフト・リミットが 0 の場合、優先度を下げるか、 リアルタイムでないポリシーへ切り替えるかの変更だけが許可される。 .IP * -ある非特権プロセスが別のプロセスに対してこれらの変更を行う際にも、 同じルールが適用される。変更を行えるのは、変更を行おうとするプロセス の実効ユーザ -ID が変更対象のプロセスの実ユーザ ID か実効ユーザ ID と 一致している場合に限られる。 +ある非特権スレッドが別のスレッドに対してこれらの変更を行う際にも、 同じルールが適用される。変更を行えるのは、変更を行おうとするスレッド の実効ユーザ +ID が変更対象のスレッドの実ユーザ ID か実効ユーザ ID と 一致している場合に限られる。 .IP * .\" commit c02aa73b1d18e43cfd79c2f193b225e84ca497c8 \fBSCHED_IDLE\fP の場合には特別なルールが適用される。 2.6.39 より前の Linux -カーネルでは、このポリシーで動作する非特権プロセスは、 \fBRLIMIT_RTPRIO\fP -リソース上限の値に関わらず、自分のポリシーを変更することができない。 2.6.39 以降の Linux カーネルでは、非特権プロセスは、自分の nice +カーネルでは、このポリシーで動作する非特権スレッドは、 \fBRLIMIT_RTPRIO\fP +リソース上限の値に関わらず、自分のポリシーを変更することができない。 2.6.39 以降の Linux カーネルでは、非特権スレッドは、自分の nice 値が \fBRLIMIT_NICE\fP リソース上限 (\fBgetrlimit\fP(2) 参照) で許可された範囲である限りは、自分のスケジューリング・ポリシーを \fBSCHED_BATCH\fP か \fBSCHED_NORMAL\fP ポリシーに切り替えることができる。 .PP -特権プロセス (\fBCAP_SYS_NICE\fP ケーパビリティを持つプロセス) の場合、 \fBRLIMIT_RTPRIO\fP の制限は無視される; +特権スレッド (\fBCAP_SYS_NICE\fP ケーパビリティを持つスレッド) の場合、 \fBRLIMIT_RTPRIO\fP の制限は無視される; 古いカーネルと同じように、スケジューリング・ポリシーと優先度に対し 任意の変更を行うことができる。 \fBRLIMIT_RTPRIO\fP に関するもっと詳しい情報は \fBgetrlimit\fP(2) を参照のこと。 .SS "応答時間 (response time)" .\" as described in .\" .BR request_irq (9). -I/O 待ちで停止したより高い優先度のプロセスは再びスケジューリングされる 前にいくらかの応答時間がかかる。デバイス・ドライバーを書く場合には +I/O 待ちで停止したより高い優先度のスレッドは再びスケジューリングされる 前にいくらかの応答時間がかかる。デバイス・ドライバーを書く場合には "slow interrupt" 割り込みハンドラーを使用することで この応答時間を劇的に減少させることができる。 .SS その他 子プロセスは \fBfork\fP(2) の際に親プロセスのスケジューリング・ポリシーとパラメータを継承する。 \fBexecve\fP(2) @@ -268,8 +268,8 @@ I/O 待ちで停止したより高い優先度のプロセスは再びスケジ リアルタイム・プロセスは大抵、ページングの待ち時間を避けるために \fBmlock\fP(2) や \fBmlockall\fP(2) を使ってメモリ・ロックをしなければならない。 -\fBSCHED_FIFO\fP や \fBSCHED_RR\fP でスケジューリングされる プロセスが停止せずに無限ループに陥ると、 -他の全てのより低い優先度のプロセスを永久に停止 (block) させてしまうので、 ソフトウェア開発者はコンソールのシェルの静的優先度をテストする +\fBSCHED_FIFO\fP や \fBSCHED_RR\fP でスケジューリングされる スレッドが停止せずに無限ループに陥ると、 +他の全てのより低い優先度のスレッドを永久に停止 (block) させてしまうので、 ソフトウェア開発者はコンソールのシェルの静的優先度をテストする アプリケーションよりも常に高く保つべきである。 これによって期待通りに停止したり終了したりしないリアルタイム・ アプリケーションを緊急終了させることが可能になる。 \fBgetrlimit\fP(2) のリソース制限 \fBRLIMIT_RTTIME\fP の説明も参照のこと。 @@ -278,7 +278,7 @@ POSIX システムでは \fI\fP に \fB_POSIX_PRIORITY_SCHEDULING\fP が定義されている場合にのみ \fBsched_setscheduler\fP() と \fBsched_getscheduler\fP() が使用できる。 .SH 返り値 成功した場合、 \fBsched_setscheduler\fP() は 0 を返す。 成功した場合、 \fBsched_getscheduler\fP() -は現在のそのプロセスのポリシー (非負の整数) を返す。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。 +は現在のそのスレッドのポリシー (非負の整数) を返す。 エラーの場合、\-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー .TP \fBEINVAL\fP @@ -287,17 +287,17 @@ POSIX システムでは \fI\fP に \fB_POSIX_PRIORITY_SCHEDULING\fP または \fIparam\fP がそのポリシーでは意味をなさない。 .TP \fBEPERM\fP -呼び出したプロセスが適切な特権を持っていない。 +呼び出したスレッドが適切な特権を持っていない。 .TP \fBESRCH\fP -プロセス ID \fIpid\fP のプロセスが見つからなかった。 +ID が \fIpid\fP のスレッドが見つからなかった。 .SH 準拠 POSIX.1\-2001 (但し、下記のバグの節も参照)。 \fBSCHED_BATCH\fP と \fBSCHED_IDLE\fP ポリシーは Linux 固有である。 .SH 注意 -POSIX.1 は、非特権プロセスが \fBsched_setscheduler\fP() を呼び出すために必要な権限の詳細を規定しておらず、 -詳細はシステムにより異なる。 例えば、Solaris 7 のマニュアルページでは、 呼び出し元プロセスの実ユーザ ID または実効ユーザ ID が -設定対象のプロセスの実ユーザ ID か保存 (save) set\-user\-ID と 一致していなければならない、となっている。 +POSIX.1 は、非特権スレッドが \fBsched_setscheduler\fP() を呼び出すために必要な権限の詳細を規定しておらず、 +詳細はシステムにより異なる。 例えば、Solaris 7 のマニュアルページでは、 呼び出し元の実ユーザ ID または実効ユーザ ID が +設定対象の実ユーザ ID か保存 (save) set\-user\-ID と 一致していなければならない、となっている。 .PP Linux では、 スケジューリングポリシーとスケジューリングパラメータは、 実際にはスレッド単位の属性である。 \fBgettid\fP(2) の呼び出しの返り値をこのシステムコールの \fIpid\fP 引き数として渡すことができる。 \fIpid\fP に 0 を指定すると、 @@ -341,7 +341,7 @@ patch\-\fIkernelversion\fP\-rt\fIpatchversion\fP パッチが適用された場合、またはパッチの内容の本流のカーネルへのマージが 完了した後では、上記に加えて設定項目として \fBCONFIG_PREEMPT_RT\fP が利用可能になる。この項目を選択すると、 Linux は通常のリアルタイム・オペレーティングシステムに変身する。 この場合には、 \fBsched_setscheduler\fP() で選択できる FIFO と -RR のスケジューリング・ポリシーは、 真のリアルタイム優先度を持つプロセスを最悪の場合のスケジューリング遅延が +RR のスケジューリング・ポリシーは、 真のリアルタイム優先度を持つスレッドを最悪の場合のスケジューリング遅延が 最小となる環境で動作させるために使われることになる。 .SH バグ POSIX では、成功時に \fBsched_setscheduler\fP() は直前のスケジューリング・ポリシーを返すべきとされている。 Linux の @@ -361,6 +361,6 @@ POSIX では、成功時に \fBsched_setscheduler\fP() は直前のスケジュ .PP Linux カーネルソースファイル \fIDocumentation/scheduler/sched\-rt\-group.txt\fP .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/setfsgid.2 b/draft/man2/setfsgid.2 index 752c6219..6c3b29c9 100644 --- a/draft/man2/setfsgid.2 +++ b/draft/man2/setfsgid.2 @@ -44,27 +44,32 @@ .\" Modified 2005-02-24, Akihiro MOTOKI .\" Updated 2012-04-30, Akihiro MOTOKI .\" -.TH SETFSGID 2 2010\-11\-22 Linux "Linux Programmer's Manual" +.TH SETFSGID 2 2013\-08\-08 Linux "Linux Programmer's Manual" .SH 名前 setfsgid \- ファイルシステムのチェックに用いられるグループ ID を設定する .SH 書式 -\fB#include \fP /* glibc では */ +\fB#include \fP .sp \fBint setfsgid(uid_t \fP\fIfsgid\fP\fB);\fP .SH 説明 -システムコール \fBsetfsgid\fP() は Linux カーネルがファイルシステムに対する 全てのアクセスのチェックに使用するグループ -IDを設定する。通常は \fIfsgid\fP の値は実効 (effective) グループID と同じになる。実際、 実効グループ ID が変更される度に -\fIfsgid\fP もまた新しい実効グループID の値に変更される。 +The system call \fBsetfsgid\fP() changes the value of the caller's filesystem +group ID\(emthe group ID that the Linux kernel uses to check for all +accesses to the filesystem. Normally, the value of the filesystem group ID +will shadow the value of the effective group ID. In fact, whenever the +effective group ID is changed, the filesystem group ID will also be changed +to the new value of the effective group ID. 通常、 \fBsetfsuid\fP() や \fBsetfsgid\fP() を明示的に呼び出すのは、Linux NFS サーバー のように、 ファイルアクセスに用いるユーザID / グループID を変更しなければならないが、 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような プログラムに限られる。 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、 プロセスを望まないシグナルにさらす可能性があり、 セキュリティホールになる。(下記参照) -\fBsetfsgid\fP() は、スーパーユーザによって呼び出された場合か、 \fIfsgid\fP が実グループID、実効グループID、 -保存セットグループID (saved set\-group\-ID)、現在の \fIfsgid\fP の値のいずれかに一致する場合にのみ成功する。 +\fBsetfsgid\fP() will succeed only if the caller is the superuser or if +\fIfsgid\fP matches either the caller's real group ID, effective group ID, +saved set\-group\-ID, or current the filesystem user ID. .SH 返り値 -成功した場合、 \fIfsgid\fP の以前の値を返す。エラーの場合は \fIfsgid\fP の現在の値を返す。 +On both success and failure, this call returns the previous filesystem group +ID of the caller. .SH バージョン .\" This system call is present since Linux 1.1.44 .\" and in libc since libc 4.7.6. @@ -75,8 +80,11 @@ IDを設定する。通常は \fIfsgid\fP の値は実効 (effective) グルー glibc が引き数がグループID として不正だと判断した場合は、 システムコールを行わず \fIerrno\fP に \fBEINVAL\fP を設定して \-1 が返される。 .LP -このシステムコールが導入された当時、プロセスは 同じ実効ユーザIDのプロセスへシグナルを送ることができた。 -今日では、シグナル送信権限の扱いはかなり違うものになっている。 +Note that at the time this system call was introduced, a process could send +a signal to a process with the same effective user ID. Today signal +permission handling is slightly different. See \fBsetfsuid\fP(2) for a +discussion of why the use of both \fBsetfsuid\fP(2) and \fBsetfsgid\fP() is +nowadays unneeded. 元々の Linux の \fBsetfsgid\fP() システムコールは 16 ビットのグループ ID だけに対応していた。 @@ -85,11 +93,17 @@ glibc が引き数がグループID として不正だと判断した場合は glibc の \fBsetfsgid\fP() のラッパー関数は カーネルバージョンによるこの違いを吸収している。 .SH バグ -いかなる種類のエラーメッセージも返さない。 失敗した場合は (呼び出し元には \fBCAP_SETGID\fP ケーパビリティがなかったのだから) 最低でも -\fBEPERM\fP くらいは返すべきである。 +No error indications of any kind are returned to the caller, and the fact +that both successful and unsuccessful calls return the same value makes it +impossible to directly determine whether the call succeeded or failed. +Instead, the caller must resort to looking at the return value from a +further call such as \fIsetfsgid(\-1)\fP (which will always fail), in order to +determine if a preceding call to \fBsetfsgid\fP() changed the filesystem group +ID. At the very least, \fBEPERM\fP should be returned when the call fails +(because the caller lacks the \fBCAP_SETGID\fP capability). .SH 関連項目 \fBkill\fP(2), \fBsetfsuid\fP(2), \fBcapabilities\fP(7), \fBcredentials\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/setfsuid.2 b/draft/man2/setfsuid.2 index b5e70d32..0a395c2f 100644 --- a/draft/man2/setfsuid.2 +++ b/draft/man2/setfsuid.2 @@ -44,27 +44,32 @@ .\" Modified 2005-02-24, Akihiro MOTOKI .\" Updated 2012-04-30, Akihiro MOTOKI .\" -.TH SETFSUID 2 2010\-11\-22 Linux "Linux Programmer's Manual" +.TH SETFSUID 2 2013\-08\-08 Linux "Linux Programmer's Manual" .SH 名前 setfsuid \- ファイルシステムのチェックに用いられるユーザ ID を設定する .SH 書式 -\fB#include \fP /* glibc では */ +\fB#include \fP .sp \fBint setfsuid(uid_t \fP\fIfsuid\fP\fB);\fP .SH 説明 -\fBsetfsuid\fP() は Linux カーネルがファイルシステムに対する 全てのアクセスのチェックに使用するユーザID を設定する。通常は -\fIfsuid\fP の値は実効 (effective) ユーザID と同じになる。実際、 実効ユーザID が変更される度に \fIfsuid\fP -もまた新しい実効ユーザID の値に変更される。 +The system call \fBsetfsuid\fP() changes the value of the caller's filesystem +user ID\(emthe user ID that the Linux kernel uses to check for all accesses +to the filesystem. Normally, the value of the filesystem user ID will +shadow the value of the effective user ID. In fact, whenever the effective +user ID is changed, the filesystem user ID will also be changed to the new +value of the effective user ID. 通常、 \fBsetfsuid\fP() や \fBsetfsgid\fP() を明示的に呼び出すのは、Linux NFS サーバー のように、 ファイルアクセスに用いるユーザID / グループID を変更しなければならないが、 対応する実(real)/実効(effective) ユーザID / グループID は変更したくないような プログラムに限られる。 NFS サーバーのようなプログラムで、通常のユーザID を変更すると、 プロセスを望まないシグナルにさらす可能性があり、 セキュリティホールになる。(下記参照) -\fBsetfsuid\fP() は、スーパーユーザによって呼び出された場合か、 \fIfsuid\fP が実ユーザID、実効ユーザID、 保存セットユーザID -(saved set\-user\-ID)、現在の \fIfsuid\fP の値のいずれかに一致する場合にのみ成功する。 +\fBsetfsuid\fP() will succeed only if the caller is the superuser or if +\fIfsuid\fP matches either the caller's real user ID, effective user ID, saved +set\-user\-ID, or current filesystem user ID. .SH 返り値 -成功した場合、 \fIfsuid\fP の以前の値を返す。エラーの場合は \fIfsuid\fP の現在の値を返す。 +On both success and failure, this call returns the previous filesystem user +ID of the caller. .SH バージョン .\" This system call is present since Linux 1.1.44 .\" and in libc since libc 4.7.6. @@ -75,8 +80,19 @@ setfsuid \- ファイルシステムのチェックに用いられるユーザ I glibc が引き数がユーザID として不正だと判断した場合は、 システムコールを行わず \fIerrno\fP に \fBEINVAL\fP を設定して \-1 が返される。 .LP -このシステムコールが導入された当時、プロセスは 同じ実効ユーザIDのプロセスへシグナルを送ることができた。 -今日では、シグナル送信権限の扱いはかなり違うものになっている。 +At the time when this system call was introduced, one process could send a +signal to another process with the same effective user ID. This meant that +if a privilged process changed its effective user ID for the purpose of file +permission checking, then it could become vulnerable to receiving signals +sent by another (unprivileged) process with the same user ID. The +filesystem user ID attribute was thus added to allow a process to change its +user ID for the purposes of file permission checking without at the same +time becoming vulnerable to receiving unwanted signals. Since Linux 2.0, +signal permission handling is different (see \fBkill\fP(2)), with the result +that a process change can change its effective user ID without being +vulnerable to receiving signals from unwanted processes. Thus, +\fBsetfsuid\fP() is nowadays unneeded and should be avoided in new +applications (likewise for \fBsetfsgid\fP(2)). 元々の Linux の \fBsetfsuid\fP() システムコールは 16 ビットのグループ ID だけに対応していた。 @@ -85,11 +101,17 @@ glibc が引き数がユーザID として不正だと判断した場合は、 glibc の \fBsetfsuid\fP() のラッパー関数は カーネルバージョンによるこの違いを吸収している。 .SH バグ -いかなる種類のエラーメッセージも呼び出し元に返さない。 失敗した場合は (呼び出し元には \fBCAP_SETUID\fP ケーパビリティがなかったのだから) -最低でも \fBEPERM\fP くらいは返すべきである。 +No error indications of any kind are returned to the caller, and the fact +that both successful and unsuccessful calls return the same value makes it +impossible to directly determine whether the call succeeded or failed. +Instead, the caller must resort to looking at the return value from a +further call such as \fIsetfsuid(\-1)\fP (which will always fail), in order to +determine if a preceding call to \fBsetfsuid\fP() changed the filesystem user +ID. At the very least, \fBEPERM\fP should be returned when the call fails +(because the caller lacks the \fBCAP_SETUID\fP capability). .SH 関連項目 \fBkill\fP(2), \fBsetfsgid\fP(2), \fBcapabilities\fP(7), \fBcredentials\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/setresuid.2 b/draft/man2/setresuid.2 index 68c30b1d..79648c44 100644 --- a/draft/man2/setresuid.2 +++ b/draft/man2/setresuid.2 @@ -61,14 +61,11 @@ UID、保存 set\-user\-ID を任意の値に設定できる。 引き数のどれかが \-1 の場合はその値は変更されずに残される。 -Regardless of what changes are made to the real UID, effective UID, and -saved set\-user\-ID, the filesystem UID is always set to the same value as the -(possibly new) effective UID. +実 UID、実効 UID、保存 set\-user\-ID にどんな変更が行われたかに関わらず、 ファイルシステム UID は常に実効 UID +(可能であれば変更後の新しい実効 UID) と同じ値に設定される。 -Completely analogously, \fBsetresgid\fP() sets the real GID, effective GID, -and saved set\-group\-ID of the calling process (and always modifies the -filesystem GID to be the same as the effective GID), with the same -restrictions for unprivileged processes. +全く同じように、 \fBsetresgid\fP() は呼び出し元のプロセスの実 GID、実効 GID、保存 set\-group\-ID を設定する +(さらにファイルシステム GID を実効 GID と同じ値に修正する)。 非特権プロセスは同様の制限を受ける。 .SH 返り値 成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。 .SH エラー diff --git a/draft/man2/setuid.2 b/draft/man2/setuid.2 index 2a48926a..36b9b1de 100644 --- a/draft/man2/setuid.2 +++ b/draft/man2/setuid.2 @@ -84,9 +84,11 @@ Linux では、 \fBsetuid\fP() は \fB_POSIX_SAVED_IDS\fP をもった POSIX SVr4, POSIX.1\-2001. 4.4BSD のコールとは完全な互換性はない、 BSD のコールは実 (real)、保存 (saved)、実効 (effective) ID の全てを設定する。 .SH 注意 -Linux has the concept of the filesystem user ID, normally equal to the -effective user ID. The \fBsetuid\fP() call also sets the filesystem user ID -of the calling process. See \fBsetfsuid\fP(2). +Linux はファイルシステム・ユーザー ID の概念を持つ。 +通常、これは実効ユーザー ID に等しい。 +\fBsetuid\fP() コールは呼び出し元のプロセスの +ファイルシステム・ユーザー ID も設定する。 +\fBsetfsuid\fP(2) も参照すること。 .PP \fIuid\fP が前の実効 UID と異っていた場合、 プロセスはコアダンプすることを禁止される。 diff --git a/draft/man2/setxattr.2 b/draft/man2/setxattr.2 index e1aed11c..55c28785 100644 --- a/draft/man2/setxattr.2 +++ b/draft/man2/setxattr.2 @@ -56,9 +56,8 @@ setxattr, lsetxattr, fsetxattr \- 拡張属性の値を設定する これらは、システム上のすべての inode に関連付けられた通常の属性 (\fBstat\fP(2) が返すデータ) を拡張するものである。 拡張属性のコンセプトは \fBattr\fP(5) に書かれている。 .PP -\fBsetxattr\fP() sets the \fIvalue\fP of the extended attribute identified by -\fIname\fP and associated with the given \fIpath\fP in the filesystem. The -\fIsize\fP of the \fIvalue\fP must be specified. +\fBsetxattr\fP() は、ファイルシステム内の指定された \fIpath\fP に対応する、名前 \fIname\fP の拡張属性の値 \fIvalue\fP +を設定する。 \fIvalue\fP の \fIsize\fP は必ず指定しなければならない。 .PP \fBlsetxattr\fP() は \fBsetxattr\fP() と同じだが、シンボリックリンクの場合に、リンクが参照しているファイル ではなく、リンクそのものの拡張属性を設定する点だけが異なる。 @@ -92,8 +91,8 @@ inode に対して、互いに独立な名前空間が複数あってもよい 拡張属性を記憶するのに十分なスペースが残っていない。 .TP \fBENOTSUP\fP -Extended attributes are not supported by the filesystem, or are disabled, -\fIerrno\fP is set to \fBENOTSUP\fP. +拡張属性がそのファイルシステムでサポートされていない、もしくは無効になっている。 +\fIerrno\fP に \fBENOTSUP\fP がセットされる。 .PP 上記に加えて、 \fBstat\fP(2) に書かれているエラーが発生する場合もある。 .SH バージョン diff --git a/draft/man2/spu_create.2 b/draft/man2/spu_create.2 index cda267d3..5dc9ded2 100644 --- a/draft/man2/spu_create.2 +++ b/draft/man2/spu_create.2 @@ -196,6 +196,6 @@ See \fBspu_run\fP(2) for an example of the use of \fBspu_create\fP() .SH 関連項目 \fBclose\fP(2), \fBspu_run\fP(2), \fBcapabilities\fP(7), \fBspufs\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/stat.2 b/draft/man2/stat.2 index 782936a0..8fa23f5b 100644 --- a/draft/man2/stat.2 +++ b/draft/man2/stat.2 @@ -111,19 +111,20 @@ _BSD_SOURCE || _XOPEN_SOURCE\ >=\ 500 || _XOPEN_SOURCE\ &&\ _XOPEN_SOURCE_EXTEND .in +4n .nf struct stat { - dev_t st_dev; /* ID of device containing file */ - ino_t st_ino; /* inode number */ - mode_t st_mode; /* protection */ - nlink_t st_nlink; /* number of hard links */ - uid_t st_uid; /* user ID of owner */ - gid_t st_gid; /* group ID of owner */ - dev_t st_rdev; /* device ID (if special file) */ - off_t st_size; /* total size, in bytes */ - blksize_t st_blksize; /* blocksize for filesystem I/O */ - blkcnt_t st_blocks; /* number of 512B blocks allocated */ - time_t st_atime; /* time of last access */ - time_t st_mtime; /* time of last modification */ - time_t st_ctime; /* time of last status change */ + dev_t st_dev; /* ファイルがあるデバイスの ID */ + ino_t st_ino; /* inode 番号 */ + mode_t st_mode; /* アクセス保護 */ + nlink_t st_nlink; /* ハードリンクの数 */ + uid_t st_uid; /* 所有者のユーザ ID */ + gid_t st_gid; /* 所有者のグループ ID */ + dev_t st_rdev; /* デバイス ID (特殊ファイルの場合) */ + off_t st_size; /* 全体のサイズ (バイト単位) */ + blksize_t st_blksize; /* ファイルシステム I/O での + ブロックサイズ */ + blkcnt_t st_blocks; /* 割り当てられた 512B のブロック数 */ + time_t st_atime; /* 最終アクセス時刻 */ + time_t st_mtime; /* 最終修正時刻 */ + time_t st_ctime; /* 最終状態変更時刻 */ }; .fi .in @@ -141,16 +142,13 @@ struct stat { \fIst_blocks\fP フィールドは、ファイルの大きさを 512 バイトのブロックサイズ単位で示す フィールドは、ファイルに割り当てされたブロック数を 512 バイト単位で示す。 (ファイルに穴があるような場合、この値は \fIst_size\fP/512 より小さくなることもある)。 -The \fIst_blksize\fP field gives the "preferred" blocksize for efficient -filesystem I/O. (Writing to a file in smaller chunks may cause an -inefficient read\-modify\-rewrite.) +\fIst_blksize\fP フィールドは、効率的にファイルシステム I/O ができる「好ましい」 ブロックサイズを示す +(もっと小さい単位でファイルに書き込みを行うと、 読み出し\-\-修正\-\-再書き込みといった非効率な動作になってしまうかもしれない)。 .PP -Not all of the Linux filesystems implement all of the time fields. Some -filesystem types allow mounting in such a way that file and/or directory -accesses do not cause an update of the \fIst_atime\fP field. (See \fInoatime\fP, -\fInodiratime\fP, and \fIrelatime\fP in \fBmount\fP(8), and related information in -\fBmount\fP(2).) In addition, \fIst_atime\fP is not updated if a file is opened -with the \fBO_NOATIME\fP; see \fBopen\fP(2). +全ての Linux のファイルシステムが全ての時間フィールドを 実装しているわけではない。 ファイルやディレクトリのアクセスが \fIst_atime\fP +フィールドを更新しないようなかたちでマウントできるファイルシステムもある。 (\fBmount\fP(8) の \fInoatime\fP, +\fInodiratime\fP, \fIrelatime\fP や \fBmount\fP(2) の関連する情報を参照)。 また、ファイルが \fBO_NOATIME\fP +付きでオープンされている場合には \fIst_atime\fP は更新されない。 \fBopen\fP(2) 参照。 \fIst_atime\fP フィールドはファイルアクセスがあった場合に変更される (例えば、 \fBexecve\fP(2), \fBmknod\fP(2), \fBpipe\fP(2), \fButime\fP(2) を使用した場合や \fBread\fP(2) で 1 バイト以上読み込んだ場合など)。 @@ -361,17 +359,19 @@ T} .SH 注意 .\" As at kernel 2.6.25, XFS and JFS support nanosecond timestamps, .\" but ext2, ext3, and Reiserfs do not. -Since kernel 2.5.48, the \fIstat\fP structure supports nanosecond resolution -for the three file timestamp fields. Glibc exposes the nanosecond component -of each field using names of the form \fIst_atim.tv_nsec\fP if the -\fB_BSD_SOURCE\fP or \fB_SVID_SOURCE\fP feature test macro is defined. These -fields are specified in POSIX.1\-2008, and, starting with version 2.12, glibc -also exposes these field names if \fB_POSIX_C_SOURCE\fP is defined with the -value 200809L or greater, or \fB_XOPEN_SOURCE\fP is defined with the value 700 -or greater. If none of the aforementioned macros are defined, then the -nanosecond values are exposed with names of the form \fIst_atimensec\fP. On -filesystems that do not support subsecond timestamps, the nanosecond fields -are returned with the value 0. +カーネル 2.5.48 以降では、 \fIstat\fP 構造体は 3 つのファイルのタイムスタンプ +関連のフィールドでナノ秒単位の精度に対応している。 glibc では、機能検査 +マクロ \fB_BSD_SOURCE\fP か \fB_SVID_SOURCE\fP が定義された場合に、各フィールドの +ナノ秒の情報を \fIst_atim.tv_nsec\fP という形式の名前で公開する。 +これらのフィールドは POSIX.1\-2008 で規定されており、 +バージョン 2.12 以降の glibc では、 +\fB_POSIX_C_SOURCE\fP が 200809L 以上の値で定義されるか、 +\fB_XOPEN_SOURCE\fP が 700 以上の値で定義された場合に、 +これらのフィールドが公開される。 +上記のマクロのいずれも定義されていない場合、ナノ秒の値は +\fIst_atimensec\fP という形式の名前で公開される。 +秒より細かいタイムスタンプをサポートしていないファイルシステムでは、 +ナノ秒のフィールドは 0 に設定される。 Linux では、 \fBlstat\fP() は一般には自動マウント動作 (automounter action) の きっかけとならないが、 \fBstat\fP() はきっかけとなる (\fBfstatat\fP(2) を参照)。 diff --git a/draft/man2/statfs.2 b/draft/man2/statfs.2 index d292ebea..2f91a898 100644 --- a/draft/man2/statfs.2 +++ b/draft/man2/statfs.2 @@ -46,7 +46,7 @@ .\" .TH STATFS 2 2010\-11\-21 Linux "Linux Programmer's Manual" .SH 名前 -statfs, fstatfs \- get filesystem statistics +statfs, fstatfs \- ファイルシステムの統計を取得する .SH 書式 \fB#include \fP/* または */ .sp @@ -54,9 +54,9 @@ statfs, fstatfs \- get filesystem statistics .br \fBint fstatfs(int \fP\fIfd\fP\fB, struct statfs *\fP\fIbuf\fP\fB);\fP .SH 説明 -The function \fBstatfs\fP() returns information about a mounted filesystem. -\fIpath\fP is the pathname of any file within the mounted filesystem. \fIbuf\fP -is a pointer to a \fIstatfs\fP structure defined approximately as follows: +関数 \fBstatfs\fP() はマウントされたファイルシステムについての情報を返す。 \fIpath\fP +はマウントされたファイルシステムにあるファイルのパス名である。 \fIbuf\fP は \fIstatfs\fP +構造体へのポインターで、およそ以下のように定義される: .in +4n .nf @@ -67,21 +67,20 @@ is a pointer to a \fIstatfs\fP structure defined approximately as follows: #endif struct statfs { - __SWORD_TYPE f_type; /* type of filesystem (see below) */ - __SWORD_TYPE f_bsize; /* optimal transfer block size */ - fsblkcnt_t f_blocks; /* total data blocks in filesystem */ - fsblkcnt_t f_bfree; /* free blocks in fs */ - fsblkcnt_t f_bavail; /* free blocks available to - unprivileged user */ - fsfilcnt_t f_files; /* total file nodes in filesystem */ - fsfilcnt_t f_ffree; /* free file nodes in fs */ - fsid_t f_fsid; /* filesystem id */ - __SWORD_TYPE f_namelen; /* maximum length of filenames */ - __SWORD_TYPE f_frsize; /* fragment size (since Linux 2.6) */ + __SWORD_TYPE f_type; /* ファイルシステムの種別 (下記参照) */ + __SWORD_TYPE f_bsize; /* 最適な転送ブロックサイズ */ + fsblkcnt_t f_blocks; /* ファイルシステムの総データブロック数 */ + fsblkcnt_t f_bfree; /* ファイルシステムの空きブロック数 */ + fsblkcnt_t f_bavail; /* 非特権ユーザが利用可能な空きブロック数 */ + fsfilcnt_t f_files; /* ファイルシステムの総ファイルノード数 */ + fsfilcnt_t f_ffree; /* ファイルシステムの空きファイルノード数 */ + fsid_t f_fsid; /* ファイルシステムの ID */ + __SWORD_TYPE f_namelen; /* ファイル名の最大長 */ + __SWORD_TYPE f_frsize; /* フラグメントサイズ (Linux 2.6 以降) */ __SWORD_TYPE f_spare[5]; }; -Filesystem types: +ファイルシステムの型: ADFS_SUPER_MAGIC 0xadf5 AFFS_SUPER_MAGIC 0xADFF @@ -133,9 +132,8 @@ Filesystem types: .PP \fIf_fsid\fP にどんな値が入るべきなのかは誰も知らない (但し、下記を参照)。 .PP -Fields that are undefined for a particular filesystem are set to 0. -\fBfstatfs\fP() returns the same information about an open file referenced by -descriptor \fIfd\fP. +それぞれのファイルシステムにおいて未定義のフィールドには 0 が 設定される。 \fBfstatfs\fP() はディスクリプター \fIfd\fP +によって参照されるオープンされたファイルについて、同じ情報を返す。 .SH 返り値 成功した場合、0 が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。 .SH エラー @@ -154,7 +152,7 @@ descriptor \fIfd\fP. この呼び出しがシグナルで中断された。 .TP \fBEIO\fP -An I/O error occurred while reading from the filesystem. +ファイルシステムからの読み込みの間に I/O エラーが発生した。 .TP \fBELOOP\fP (\fBstatfs\fP() の場合) \fIpath\fP を解決するのに辿るべきシンボリックリンクが多すぎる。 @@ -169,7 +167,7 @@ An I/O error occurred while reading from the filesystem. 十分なカーネルメモリがない。 .TP \fBENOSYS\fP -The filesystem does not support this call. +ファイルシステムがこの呼び出しをサポートしていない。 .TP \fBENOTDIR\fP (\fBstatfs\fP() の場合) \fIpath\fP のディレクトリ部分がディレクトリでない。 @@ -202,13 +200,11 @@ statfs\fP を返す (\fI\fP で定義されている)。 この構造 が含まれており、 \fIfsid_t\fP は \fIstruct { int val[2]; }\fP と定義されている。 FreeBSD でも同じであるが、インクルードファイル \fI\fP を使う。 -The general idea is that \fIf_fsid\fP contains some random stuff such that the -pair (\fIf_fsid\fP,\fIino\fP) uniquely determines a file. Some operating systems -use (a variation on) the device number, or the device number combined with -the filesystem type. Several OSes restrict giving out the \fIf_fsid\fP field -to the superuser only (and zero it for unprivileged users), because this -field is used in the filehandle of the filesystem when NFS\-exported, and -giving it out is a security concern. +\fIf_fsid\fP はあるランダムな値を持ち、 (\fIf_fsid\fP,\fIino\fP) という 1 組の値でファイルを一意に決定できるようにする、 +というのが基本的な考え方である。 いくつかの OS では、デバイス番号 (の変種) を使ったり、 +デバイス番号とファイルシステムタイプを組み合わせて使ったりしている。 OS の中には \fIf_fsid\fP +フィールドの取得をスーパーユーザに限定しているものもある (非特権ユーザが取得すると 0 となる)。 NFS でエクスポートされる場合、 +このフィールドがファイルシステムのファイルハンドルで使われており、 この値を提供するとセキュリティ上の問題がある。 .LP いくつかの OS では、 \fIfsid\fP を \fBsysfs\fP(2) システムコールの第 2 引き数として使用できる。 .SH 関連項目 diff --git a/draft/man2/sysfs.2 b/draft/man2/sysfs.2 index 40224a80..4f0d4448 100644 --- a/draft/man2/sysfs.2 +++ b/draft/man2/sysfs.2 @@ -81,6 +81,6 @@ SVr4. .SH バグ libc または glibc のサポートは存在しない。 \fIbuf\fP の大きさがどれだけ必要かを推測する方法がない。 .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man2/umount.2 b/draft/man2/umount.2 index ff3076c4..22959cf4 100644 --- a/draft/man2/umount.2 +++ b/draft/man2/umount.2 @@ -40,7 +40,7 @@ .\" .TH UMOUNT 2 2010\-06\-19 Linux "Linux Programmer's Manual" .SH 名前 -umount, umount2 \- unmount filesystem +umount, umount2 \- ファイルシステムをアンマウントする .SH 書式 .nf \fB#include \fP @@ -53,11 +53,9 @@ umount, umount2 \- unmount filesystem .\" Note: the kernel naming differs from the glibc naming .\" umount2 is the glibc name for what the kernel now calls umount .\" and umount is the glibc name for oldumount -\fBumount\fP() and \fBumount2\fP() remove the attachment of the (topmost) -filesystem mounted on \fItarget\fP. +\fBumount\fP() と \fBumount2\fP() は \fItarget\fP にマウントされている (最上位の) ファイルシステムを外す。 -Appropriate privilege (Linux: the \fBCAP_SYS_ADMIN\fP capability) is required -to unmount filesystems. +ファイルシステムのアンマウントを行うには、 適切な権限 (Linux では \fBCAP_SYS_ADMIN\fP ケーパビリティ) が必要である。 Linux 2.1.116 から、 \fBumount2\fP() システムコールが追加された。これは \fBumount\fP() と同様に \fItarget\fP をアンマウントするが、 \fIflags\fP が追加されており、操作時の振る舞いを制御できる。 @@ -77,19 +75,18 @@ Linux 2.1.116 から、 \fBumount2\fP() システムコールが追加された .TP \fBUMOUNT_NOFOLLOW\fP (Linux 2.6.34 以降) .\" Later added to 2.6.33-stable -Don't dereference \fItarget\fP if it is a symbolic link. This flag allows -security problems to be avoided in set\-user\-ID\-\fIroot\fP programs that allow -unprivileged users to unmount filesystems. +\fItarget\fP がシンボリックリンクの場合に、シンボリックリンクの展開を行わない。 +このフラグを使うと、 \fIroot\fP に set\-user\-ID されたプログラムにおいて、 +非特権ユーザがファイルシステムのアンマウントをできてしまうという +セキュリティ問題を回避することができる。 .SH 返り値 成功した場合、0 が返される。 失敗した場合、 \-1 が返され、 \fIerrno\fP に適切な値がセットされる。 .SH エラー -The error values given below result from filesystem type independent -errors. Each filesystem type may have its own special errors and its own -special behavior. See the Linux kernel source code for details. +以下に示すエラーは、ファイルシステムに依存しないものである。 それぞれのファイルシステムタイプには固有のエラーが存在する場合があり、 +独自の動作をすることもある。詳しくは Linux カーネルのソースを見て欲しい。 .TP \fBEAGAIN\fP -A call to \fBumount2\fP() specifying \fBMNT_EXPIRE\fP successfully marked an -unbusy filesystem as expired. +\fBMNT_EXPIRE\fP を指定した \fBumount2\fP() の呼び出しで、正常に未使用のファイルシステムに期限切れの印を つけることができた。 .TP \fBEBUSY\fP 使用中 (busy) のため、 \fItarget\fP をアンマウントできなかった。 diff --git a/draft/man2/unshare.2 b/draft/man2/unshare.2 index 49c9b981..d8372641 100644 --- a/draft/man2/unshare.2 +++ b/draft/man2/unshare.2 @@ -75,10 +75,9 @@ _BSD_SOURCE || _SVID_SOURCE 呼び出し元プロセスは他のプロセスとファイルディスクリプタを共有しなくなる。 .TP \fBCLONE_FS\fP -Reverse the effect of the \fBclone\fP(2) \fBCLONE_FS\fP flag. Unshare filesystem -attributes, so that the calling process no longer shares its root directory -(\fBchroot\fP(2)), current directory (\fBchdir\fP(2)), or umask (\fBumask\fP(2)) -attributes with any other process. +\fBclone\fP(2) \fBCLONE_FS\fP フラグの効果を取り消す。ファイルシステム属性を共有させず、呼び出し元プロセスは、ルートディレクトリ +(\fBchroot\fP(2))、カレントディレクトリ (\fBchdir\fP(2))、 umask (\fBumask\fP(2)) +を他のプロセスと共有しなくなる。 .TP \fBCLONE_NEWIPC\fP (Linux 2.6.19 以降) このフラグは \fBclone\fP(2) \fBCLONE_NEWIPC\fP フラグと同じ効果を持つ。 diff --git a/draft/man2/ustat.2 b/draft/man2/ustat.2 index 8f63837b..a658a8fb 100644 --- a/draft/man2/ustat.2 +++ b/draft/man2/ustat.2 @@ -42,7 +42,7 @@ .\" .TH USTAT 2 2003\-08\-04 Linux "Linux Programmer's Manual" .SH 名前 -ustat \- get filesystem statistics +ustat \- ファイルシステム (file system) の統計を得る .SH 書式 .nf \fB#include \fP @@ -54,9 +54,8 @@ ustat \- get filesystem statistics \fBint ustat(dev_t \fP\fIdev\fP\fB, struct ustat *\fP\fIubuf\fP\fB);\fP .fi .SH 説明 -\fBustat\fP() returns information about a mounted filesystem. \fIdev\fP is a -device number identifying a device containing a mounted filesystem. \fIubuf\fP -is a pointer to a \fIustat\fP structure that contains the following members: +\fBustat\fP() はマウント (mount) されたファイルシステムの情報を返す。 \fIdev\fP は調べるファイルシステムを含んでいるデバイス +(device) の デバイス番号。 \fIubuf\fP は以下のメンバーを含む ustat 構造体へのポインター: .in +4n .nf @@ -78,11 +77,11 @@ char f_fpack[6]; /* Filsys pack name */ \fIubuf\fP がアクセス可能な空間の外側を指している。 .TP \fBEINVAL\fP -\fIdev\fP does not refer to a device containing a mounted filesystem. +\fIdev\fP がマウントされたファイルシステムを含むデバイスを参照していない。 .TP \fBENOSYS\fP -The mounted filesystem referenced by \fIdev\fP does not support this operation, -or any version of Linux before 1.3.16. +\fIdev\fP で参照されるマウントされたファイルシステムがこの操作 (operation) を サポートしていないか、Linux のバージョンが +1.3.16 以前である。 .SH 準拠 .\" SVr4 documents additional error conditions ENOLINK, ECOMM, and EINTR .\" but has no ENOSYS condition. @@ -93,11 +92,10 @@ SVr4. .SS "HP\-UX における注意" .\" Some software tries to use this in order to test whether the .\" underlying filesystem is NFS. -The HP\-UX version of the \fIustat\fP structure has an additional field, -\fIf_blksize\fP, that is unknown elsewhere. HP\-UX warns: For some filesystems, -the number of free inodes does not change. Such filesystems will return \-1 -in the field \fIf_tinode\fP. For some filesystems, inodes are dynamically -allocated. Such filesystems will return the current number of free inodes. +HP\-UX 版の構造体 \fIustat\fP には、その他にフィールド \fIf_blksize\fP が存在するが、他では見かけない。 HP\-UX +は次のように警告している: ファイルシステムの中には、解放されている inode の数を変更しないものもある。 このようなファイルシステムは、フィールド +\fIf_tinode\fP に \-1 を返す。 ファイルシステムの中には、inode を動的に確保するものもある。 +このようなファイルシステムは、現在解放されている inode の数を返す。 .SH 関連項目 \fBstat\fP(2), \fBstatfs\fP(2) .SH この文書について diff --git a/draft/man3/ftw.3 b/draft/man3/ftw.3 index 7e965d72..707d5761 100644 --- a/draft/man3/ftw.3 +++ b/draft/man3/ftw.3 @@ -148,7 +148,7 @@ ftw, nftw \- ファイルツリーを歩きまわる (デフォルトでは、ディレクトリ自身の処理はディレクトリ内のエントリ より「前に」行なわれる)。 .TP \fBFTW_MOUNT\fP -If set, stay within the same filesystem (i.e., do not cross mount points). +セットされると、同じファイルシステムの中だけを探索対象とする (つまり、マウントポイントをまたぐことはない)。 .TP \fBFTW_PHYS\fP セットされると、シンボリックリンクを辿らない (おそらくこちらが 通常望ましい動作だろう)。セットされていないとシンボリックリンクを diff --git a/draft/man3/getmntent.3 b/draft/man3/getmntent.3 index 78e376a9..1d42726b 100644 --- a/draft/man3/getmntent.3 +++ b/draft/man3/getmntent.3 @@ -42,8 +42,8 @@ .\" .TH GETMNTENT 3 2009\-09\-15 "" "Linux Programmer's Manual" .SH 名前 -getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r \- get -filesystem descriptor file entry +getmntent, setmntent, addmntent, endmntent, hasmntopt, getmntent_r \- +ファイルシステム記述ファイルのエントリを取得する .SH 書式 .nf \fB#include \fP @@ -72,22 +72,20 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参 .sp \fBgetmntent_r\fP(): _BSD_SOURCE || _SVID_SOURCE .SH 説明 -These routines are used to access the filesystem description file -\fI/etc/fstab\fP and the mounted filesystem description file \fI/etc/mtab\fP. +これらのルーチンは、ファイルシステムを記述したファイル \fI/etc/fstab\fP と、マウントされているファイルシステムを記述したファイル +\fI/etc/mtab\fP にアクセスするために用いられる。 .PP -The \fBsetmntent\fP() function opens the filesystem description file -\fIfilename\fP and returns a file pointer which can be used by \fBgetmntent\fP(). -The argument \fItype\fP is the type of access required and can take the same -values as the \fImode\fP argument of \fBfopen\fP(3). +\fBsetmntent\fP() 関数は、ファイルシステムの記述ファイル \fIfilename\fP をオープンして、 +そのファイルポインタを返す。このファイルポインタは \fBgetmntent\fP() によって用いられる。引き数 \fItype\fP +は要求するアクセス形式で、 \fBfopen\fP(3) の \fImode\fP 引き数と同じ値を取ることができる。 .PP -The \fBgetmntent\fP() function reads the next line from the filesystem -description file \fIfp\fP and returns a pointer to a structure containing the -broken out fields from a line in the file. The pointer points to a static -area of memory which is overwritten by subsequent calls to \fBgetmntent\fP(). +\fBgetmntent\fP() 関数はファイルシステムの記述ファイル \fIfp\fP から新しい行を読 +み込み、行をフィールドに分割した内容を収めた構造体へのポインタを返す。 ポインタはメモリの静的な領域を指しており、この領域は +\fBgetmntent\fP() を次に呼び出したときに上書きされてしまう。 .PP \fBaddmntent\fP() 関数は \fImntent\fP 構造体 \fImnt\fP の内容を、オープンされているファイル \fIfp\fP の最後に追加する。 .PP -The \fBendmntent\fP() function closes the filesystem description file \fIfp\fP. +\fBendmntent\fP() 関数はファイルシステムの記述ファイル \fIfp\fP を閉じる。 .PP \fBhasmntopt\fP() 関数は \fImntent\fP 構造体 \fImnt\fP の \fImnt_opts\fP フィールド (下記 参照) をスキャンし、 \fIopt\fP に一致する部分文字列があるかを調べる。 有効なマウントオプションについては \fI\fP と @@ -102,8 +100,8 @@ The \fBendmntent\fP() function closes the filesystem description file \fIfp\fP. .in +4n .nf struct mntent { - char *mnt_fsname; /* name of mounted filesystem */ - char *mnt_dir; /* filesystem path prefix */ + char *mnt_fsname; /* name of mounted file system */ + char *mnt_dir; /* file system path prefix */ char *mnt_type; /* mount type (see mntent.h) */ char *mnt_opts; /* mount options (see mntent.h) */ int mnt_freq; /* dump frequency in days */ @@ -127,8 +125,8 @@ mtab や fstab ファイルでは、各フィールドは空白で区切られ \fBhasmntopt\fP() 関数は、マッチした場合は部分文字列へのアドレスを返し、 マッチしなければ NULL を返す。 .SH ファイル .nf -/etc/fstab filesystem description file -/etc/mtab mounted filesystem description file +/etc/fstab ファイルシステム記述ファイル +/etc/mtab マウントされたファイルシステムの記述ファイル .fi .SH 準拠 リエントラントでない関数は SunOS 4.1.3 由来のものである。 \fBgetmntent_r\fP() 関数は HPUX 10 diff --git a/draft/man3/mkfifo.3 b/draft/man3/mkfifo.3 index 5276a21a..bf534e45 100644 --- a/draft/man3/mkfifo.3 +++ b/draft/man3/mkfifo.3 @@ -53,9 +53,8 @@ mkfifo \- FIFOスペシャルファイル(名前付きパイプ)を作成する で指定され、プロセスの \fBumask\fP によって通常の方式で変更を受ける: 作成されたファイルの許可 モードは \fB(\fP\fImode\fP\fB & ~umask)\fP となる。 .PP -A FIFO special file is similar to a pipe, except that it is created in a -different way. Instead of being an anonymous communications channel, a FIFO -special file is entered into the filesystem by calling \fBmkfifo\fP(). +FIFOスペシャルファイルはパイプに似ているが、作成のされ方のみが異なって いる。FIFOスペシャルファイルは名前のない通信路ではなく、 +\fBmkfifo\fP() の呼び出しによりファイルシステムの中に加えられる。 .PP ひとたびこのようにしてFIFOスペシャルファイルが作成されると、通常のファ イルと同じように、どのプロセスからでも読み出し、書き込み用にこれをオー プンすることができる。ただし、これに対する全ての入出力操作に先立って その両端がオープンされている必要がある。FIFOを読み出し用にオープンする @@ -69,30 +68,28 @@ FIFOスペシャルファイルをブロックせずに扱う方法について \fIpathname\fP の中のディレクトリの一つに対し検索(実行)許可がない。 .TP \fBEDQUOT\fP -The user's quota of disk blocks or inodes on the filesystem has been -exhausted. +ディスクブロックか inode がそのファイルシステムのユーザクォータに達していた。 .TP \fBEEXIST\fP \fIpathname\fP がすでに存在する。 これには \fIpathname\fP がシンボリックリンクである場合も含まれる (シンボリックリンクがリンク切れか (dangling) どうかは関係ない)。 .TP \fBENAMETOOLONG\fP -Either the total length of \fIpathname\fP is greater than \fBPATH_MAX\fP, or an -individual filename component has a length greater than \fBNAME_MAX\fP. In the -GNU system, there is no imposed limit on overall filename length, but some -filesystems may place limits on the length of a component. +\fIpathname\fP の長さが \fBPATH_MAX\fP を超えているか、個々のファイル 名部分の長さが \fBNAME_MAX\fP +を超えている。GNUシステムにおいては、ファ イル名の全体の長さに対しては制限は課せられていないが、ファイルシステム +によっては各部分の長さに制限のある可能性がある。 .TP \fBENOENT\fP \fIpathname\fP 中のディレクトリ部分が存在しない、 もしくはリンク先の無いシンボリックリンクである。 .TP \fBENOSPC\fP -The directory or filesystem has no room for the new file. +ディレクトリまたはファイルシステムに新規ファイルを作成する余地がない。 .TP \fBENOTDIR\fP \fIpathname\fP 中のディレクトリ要素が、実際にはディレクトリでない。 .TP \fBEROFS\fP -\fIpathname\fP refers to a read\-only filesystem. +\fIpathname\fP が読み取り専用のファイルシステムを指している。 .SH 準拠 POSIX.1\-2001. .SH 関連項目 diff --git a/draft/man3/statvfs.3 b/draft/man3/statvfs.3 index 88519f69..42ccd5fe 100644 --- a/draft/man3/statvfs.3 +++ b/draft/man3/statvfs.3 @@ -41,7 +41,7 @@ .\" .TH STATVFS 3 2003\-08\-22 Linux "Linux Programmer's Manual" .SH 名前 -statvfs, fstatvfs \- get filesystem statistics +statvfs, fstatvfs \- ファイルシステムの統計を取得する .SH 書式 \fB#include \fP .sp @@ -49,24 +49,24 @@ statvfs, fstatvfs \- get filesystem statistics .br \fBint fstatvfs(int \fP\fIfd\fP\fB, struct statvfs *\fP\fIbuf\fP\fB);\fP .SH 説明 -The function \fBstatvfs\fP() returns information about a mounted filesystem. -\fIpath\fP is the pathname of any file within the mounted filesystem. \fIbuf\fP -is a pointer to a \fIstatvfs\fP structure defined approximately as follows: +関数 \fBstatvfs\fP() はマウントされたファイルシステムについての情報を返す。 \fIpath\fP +はマウントされたファイルシステム中の任意のファイルのパス名である。 \fIbuf\fP は、だいたい以下のように定義されている \fIstatvfs\fP +構造体へのポインタである: .in +4n .nf struct statvfs { - unsigned long f_bsize; /* filesystem block size */ - unsigned long f_frsize; /* fragment size */ - fsblkcnt_t f_blocks; /* size of fs in f_frsize units */ - fsblkcnt_t f_bfree; /* # free blocks */ - fsblkcnt_t f_bavail; /* # free blocks for unprivileged users */ - fsfilcnt_t f_files; /* # inodes */ - fsfilcnt_t f_ffree; /* # free inodes */ - fsfilcnt_t f_favail; /* # free inodes for unprivileged users */ - unsigned long f_fsid; /* filesystem ID */ - unsigned long f_flag; /* mount flags */ - unsigned long f_namemax; /* maximum filename length */ + unsigned long f_bsize; /* ファイルシステムのブロックサイズ */ + unsigned long f_frsize; /* フラグメントサイズ */ + fsblkcnt_t f_blocks; /* ファイルシステムのサイズ (f_frsize 単位) */ + fsblkcnt_t f_bfree; /* 解放されているブロック数 */ + fsblkcnt_t f_bafvail; /* 非特権ユーザ用に解放されているブロック数 */ + fsfilcnt_t f_files; /* inode 数 */ + fsfilcnt_t f_ffree; /* 解放されている inode の数 */ + fsfilcnt_t f_favail; /* 非特権ユーザ用に解放されている inode の数 */ + unsigned long f_fsid; /* ファイルシステム ID */ + unsigned long f_flag; /* マウントフラグ */ + unsigned long f_namemax; /* ファイル名の長さの最大値 */ }; .fi .in @@ -78,13 +78,12 @@ struct statvfs { POSIX で定義されているビットは以下の通り: .TP \fBST_RDONLY\fP -Read\-only filesystem. +読み込み専用のファイルシステム。 .TP \fBST_NOSUID\fP \fBexec\fP(3) に無視される set\-user\-id/set\-group\-ID ビット。 .LP -It is unspecified whether all members of the returned struct have meaningful -values on all filesystems. +返された構造体の全てのメンバが全てのファイルシステムで 意味のある値であるか否かは、指定されていない。 \fBfstatvfs\fP() は、ディスクリプタ \fIfd\fP で参照されるオープンされたファイルについて、同じ情報を返す。 .SH 返り値 @@ -105,7 +104,7 @@ values on all filesystems. この呼び出しがシグナルで中断された。 .TP \fBEIO\fP -An I/O error occurred while reading from the filesystem. +ファイルシステムからの読み込みの間に I/O エラーが発生した。 .TP \fBELOOP\fP (\fBstatvfs\fP() の場合) \fIpath\fP にシンボリックリンクが多すぎる。 @@ -120,7 +119,7 @@ An I/O error occurred while reading from the filesystem. 十分なカーネルメモリがない。 .TP \fBENOSYS\fP -The filesystem does not support this call. +ファイルシステムがこの呼び出しをサポートしていない。 .TP \fBENOTDIR\fP (\fBstatvfs\fP() の場合) \fIpath\fP のディレクトリ部分がディレクトリでない。 diff --git a/draft/man4/console_ioctl.4 b/draft/man4/console_ioctl.4 index 650754a9..09bcf410 100644 --- a/draft/man4/console_ioctl.4 +++ b/draft/man4/console_ioctl.4 @@ -151,7 +151,7 @@ KD_GRAPHICS 0x01 用いられる(0 < \fIN\fP <= 32)。 この呼び出しをすると Unicode のマッピングが無効になる。 .TP \fBPIO_FONTX\fP -Sets screen font and associated rendering information. \fIargp\fP points to a +スクリーンフォントと、それに関連するレンダリング情報をセットする。 \fIargp\fP は、以下の構造体を指す。 .in +4n .nf diff --git a/draft/man4/initrd.4 b/draft/man4/initrd.4 index 7d7652d9..2f258960 100644 --- a/draft/man4/initrd.4 +++ b/draft/man4/initrd.4 @@ -263,6 +263,6 @@ loader) によって初期化 (例えば、ロード) される RAM ディス Linux カーネルソースの \fIinitrd.txt\fP、 LILO のドキュメント、LOADLIN のドキュメント、SYSLINUX のドキュメント .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man4/sk98lin.4 b/draft/man4/sk98lin.4 index da240fc1..84174d5c 100644 --- a/draft/man4/sk98lin.4 +++ b/draft/man4/sk98lin.4 @@ -59,12 +59,10 @@ insmod を使ってドライバをロードする際、 ネットワークアダ insmod sk98lin.o AutoNeg_A=On,Off -After \fBsk98lin\fP is bound to one or more adapter cards and the \fI/proc\fP -filesystem is mounted on your system, a dedicated statistics file will be -created in the folder \fI/proc/net/sk98lin\fP for all ports of the installed -network adapter cards. Those files are named \fIeth[x]\fP whereas \fIx\fP is the -number of the interface that has been assigned to a dedicated port by the -system. +\fBsk98lin\fP が 1 つ以上のアダプタカードに関連づけられていて、 かつ \fI/proc\fP ファイルシステムがシステムにマウントされている場合、 +取り付けられているネットワークアダプタカードの全てのポートについて、 (ポート単位に) 専用の統計ファイルがフォルダ +\fI/proc/net/sk98lin\fP に作られる。 これらのファイルは \fIeth[x]\fP という名前であり、 \fIx\fP +はインタフェースの番号である。 この番号はシステムによってポート毎に割り当てられたものである。 ロードが完了すると、 \fBifconfig\fP(8) コマンドを使って、各 \fIeth[x]\fP インタフェースに希望する IP アドレスを割り当てることができる。 これによりアダプタがイーサネットに接続され、 コンソールに状態メッセージが表示される。 このメッセージでは、 diff --git a/draft/man4/vcs.4 b/draft/man4/vcs.4 index 360a88c4..07bf9591 100644 --- a/draft/man4/vcs.4 +++ b/draft/man4/vcs.4 @@ -57,9 +57,8 @@ vcs, vcsa \- 仮想コンソールメモリ (virtual console memory) Linux で 利用可能である)。 値は \fBioctl\fP(2) の 3 番目の引き数が指す \fIunsigned short\fP に格納されて返される。 .PP -These devices replace the screendump \fBioctl\fP(2) operations of -\fBconsole\fP(4), so the system administrator can control access using -filesystem permissions. +これらのデバイスは \fBconsole\fP(4) の screendump \fBioctl\fP(2) を代替となる。 +従って、システム管理者はファイルシステムパーミッション (filesystem permission) を使ってアクセスをコントロールできる。 .PP 最初の 8 つの仮想端末のためのデバイスは、次のようにして作る事ができる: diff --git a/draft/man5/core.5 b/draft/man5/core.5 index 75c9a970..e53e7125 100644 --- a/draft/man5/core.5 +++ b/draft/man5/core.5 @@ -60,9 +60,8 @@ file)\fP を生成することである。コアダンプファイルは、デ .IP * コアダンプに使おうとしたのと同じ名前の (書き込み可能な、通常の) ファイルが すでに存在し、そのファイルに対するハードリンクが 2個以上ある場合。 .IP * -The filesystem where the core dump file would be created is full; or has run -out of inodes; or is mounted read\-only; or the user has reached their quota -for the filesystem. +コアダンプファイルを生成しようとしたファイルシステムがフルであるか、 inode が全て使用されているか、読み込み専用でマウントされている場合。 +または、そのユーザのディスク使用量がそのファイルシステムの クオータ (quota) に達している。 .IP * コアダンプファイルを生成しようとしたディレクトリが存在しない場合。 .IP * diff --git a/draft/man5/filesystems.5 b/draft/man5/filesystems.5 index bbe5a31b..dafcbbcb 100644 --- a/draft/man5/filesystems.5 +++ b/draft/man5/filesystems.5 @@ -59,7 +59,7 @@ Minix オペレーティングシステムのファイルシステム。 Linux RAM ディスクに便利なのでまだ残っている。 .TP \fBext\fP -\fBminix\fP ファイルシステムの手の込んだ拡張である。これは第二拡張ファイルシステム (second extended file system : +\fBminix\fP ファイルシステムの手の込んだ拡張である。これは第二拡張ファイルシステム (second extended filesystem : \fBext2\fP) に完全にとって代わられ、カーネル 2.1.21 で取り除かれた。 .TP \fBext2\fP @@ -161,6 +161,6 @@ Manager が使っている。 .SH 関連項目 \fBproc\fP(5), \fBfsck\fP(8), \fBmkfs\fP(8), \fBmount\fP(8) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man5/proc.5 b/draft/man5/proc.5 index 5b413567..d377c519 100644 --- a/draft/man5/proc.5 +++ b/draft/man5/proc.5 @@ -105,11 +105,11 @@ .\" .TH PROC 5 2013\-09\-04 Linux "Linux Programmer's Manual" .SH 名前 -proc \- process information pseudo\-filesystem +proc \- プロセスの情報を含む擬似ファイルシステム .SH 説明 -The \fIproc\fP filesystem is a pseudo\-filesystem which provides an interface to -kernel data structures. It is commonly mounted at \fI/proc\fP. Most of it is -read\-only, but some files allow kernel variables to be changed. +\fIproc\fP ファイルシステムは擬似的なファイルシステムであり、 カーネル内のデータへのインターフェースとして使用される。 一般的には +\fI/proc\fP にマウントされる。 大部分のファイルは読み出し専用 (read\-only) であるが、 いくつかのファイルは書き込み可能であり、 +そのファイルに書き込めばカーネルの内部変数を変更できる。 .LP The following list describes many of the files and directories under the \fI/proc\fP hierarchy. @@ -300,7 +300,7 @@ flags: 01002002 このディレクトリのファイルは、プロセスの所有者だけが読み出すことができる。 .TP -\fI/proc/[pid]/io\fP (since kernel 2.6.20) +\fI/proc/[pid]/io\fP (kernel 2.6.20 以降) .\" commit 7c3ab7381e79dfc7db14a67c6f4f3285664e1ec2 This file contains I/O statistics for the process, for example: .in +4n @@ -499,10 +499,10 @@ Linux 2.0 ではパス名を書いたフィールドがない。 parent ID: 親マウントの ID (マウントツリーの最上位の場合は自分自身の ID となる)。 .TP (3) -major:minor: value of \fIst_dev\fP for files on filesystem (see \fBstat\fP(2)). +major:minor: ファイルシステム上のファイルの \fIst_dev\fP の値 (\fBstat\fP(2) 参照)。 .TP (4) -root: root of the mount within the filesystem. +ルート: そのファイルシステム内のマウントのルート。 .TP (5) マウントポイント: マウントポイントのそのプロセスのルートからの相対パス。 @@ -517,10 +517,10 @@ root: root of the mount within the filesystem. セパレータ: オプションフィールドの終わりを示す。 .TP (9) -filesystem type: name of filesystem in the form "type[.subtype]". +ファイルシステム種別: ファイルシステムの名前。 "type[.subtype]" という形式となる。 .TP (10) -mount source: filesystem\-specific information or "none". +マウント元: ファイルシステム固有の情報。ない場合は "none" となる。 .TP (11) super options: スーパーブロック単位のオプション。 @@ -550,12 +550,11 @@ mount propagation の詳細については、 Linux カーネルソースツリ \fIDocumentation/filesystems/sharedsubtree.txt\fP を参照。 .TP \fI/proc/[pid]/mounts\fP (Linux 2.4.19 以降) -This is a list of all the filesystems currently mounted in the process's -mount namespace. The format of this file is documented in \fBfstab\fP(5). -Since kernel version 2.6.15, this file is pollable: after opening the file -for reading, a change in this file (i.e., a filesystem mount or unmount) -causes \fBselect\fP(2) to mark the file descriptor as readable, and \fBpoll\fP(2) -and \fBepoll_wait\fP(2) mark the file as having an error condition. +そのプロセスのマウント名前空間に現在マウントされている 全ファイルシステムのリスト。 このファイルのフォーマットは \fBfstab\fP(5) +に載っている。 カーネル 2.6.15 以降では、このファイルを監視することができる (pollable)。 +このファイルを読み出し用にオープンした後で、このファイルに変更があると (つまりファイルシステムのマウントやアンマウントがあると)、 +\fBselect\fP(2) ではそのファイルディスクリプタは読み出し可能となり、 \fBpoll\fP(2) と \fBepoll_wait\fP(2) +ではそのファイルはエラー状態として通知される。 .TP \fI/proc/[pid]/mountstats\fP (Linux 2.6.17 以降) このファイルを通じて、そのプロセスの名前空間内のマウントポイントに関する 各種情報 (統計、設定情報) を参照できる。 @@ -573,14 +572,14 @@ device /dev/sda7 mounted on /home with fstype ext3 [statistics] マウントされているデバイス名 (対応するデバイスがない場合は "nodevice" となる)。 .TP (2) -The mount point within the filesystem tree. +マウントポイントのファイルシステムツリーにおけるパス名。 .TP (3) -The filesystem type. +ファイルシステム種別。 .TP (4) -Optional statistics and configuration information. Currently (as at Linux -2.6.26), only NFS filesystems export information via this field. +追加の統計や設定情報。 現在のところ (Linux 2.6.26 時点では)、 このフィールドで情報が提供されているのは NFS +ファイルシステムだけである。 .RE .IP このファイルはプロセスの所有者だけが読み出すことができる。 @@ -711,9 +710,10 @@ Writing to \fI/proc/[pid]/oom_score_adj\fP or \fI/proc/[pid]/oom_adj\fP will change the other with its scaled value. .TP \fI/proc/[pid]/root\fP -UNIX and Linux support the idea of a per\-process root of the filesystem, set -by the \fBchroot\fP(2) system call. This file is a symbolic link that points -to the process's root directory, and behaves as exe, fd/*, etc. do. +UNIX と Linux では、 ファイルシステムのルート (/) をプロセスごとに別々に +できる。これはシステムコール \fBchroot\fP(2) によって設定する。 このファイルは +プロセスのルートディレクトリを指すシンボリックリンクで、 exe や fd/* など +と同じような動作をする。 .\" The following was still true as at kernel 2.6.13 .\" FIXME Describe /proc/[pid]/seccomp @@ -1033,7 +1033,7 @@ sleep; ディスク待ちの休眠状態)", "T (stopped; 停止状態)", "T (tra .IP * \fITracerPid\fP: このプロセスをトレースしているプロセスの PID (トレースされていない場合は 0)。 .IP * -\fIUid\fP, \fIGid\fP: Real, effective, saved set, and filesystem UIDs (GIDs). +\fIUid\fP, \fIGid\fP: 実 UID/GID、実効 UID/GID、保存 set\-UID/GID、ファイルシステム UID/GID。 .IP * \fIFDSize\fP: 現在割り当てられているファイルディスクリプタのスロット数。 .IP * @@ -1168,16 +1168,13 @@ SMP マシンでは各 CPU についての情報が書かれている。 \fBlscp カーネルのコンパイル時に \fBCONFIG_FB\fP が定義されている場合、フレームバッファの情報が書かれる。 .TP \fI/proc/filesystems\fP -A text listing of the filesystems which are supported by the kernel, namely -filesystems which were compiled into the kernel or whose kernel modules are -currently loaded. (See also \fBfilesystems\fP(5).) If a filesystem is marked -with "nodev", this means that it does not require a block device to be -mounted (e.g., virtual filesystem, network filesystem). +カーネルが対応しているファイルシステムのテキスト形式のリスト。 カーネルに組み込まれてコンパイルされたファイルシステムと、 +カーネルモジュールが現在ロードされているファイルシステムが列挙される (\fBfilesystems\fP(5) 参照)。 ファイルシステムに +"nodev" という印が付いている場合、 そのファイルシステムがマウントするためのブロックデバイスを 必要としないことを意味する (例えば、 +仮想ファイルシステム、ネットワークファイルシステムなど)。 -Incidentally, this file may be used by \fBmount\fP(8) when no filesystem is -specified and it didn't manage to determine the filesystem type. Then -filesystems contained in this file are tried (excepted those that are marked -with "nodev"). +ちなみに、マウント時にファイルシステムが指定されず、 どうやってもファイルシステムの種類を判定できなかった際に、 このファイルを \fBmount\fP(8) +が使用するかもしれない。 その場合、このファイルに含まれるファイルシステムが試される (ただし、"nodev" の印がついたものは除く)。 .TP \fI/proc/fs\fP 空のサブディレクトリ。 @@ -1446,11 +1443,10 @@ number of surplus huge pages is controlled by 現在システムにロードされているモジュールのテキスト形式のリスト。 \fBlsmod\fP(8) も参照。 .TP \fI/proc/mounts\fP -Before kernel 2.4.19, this file was a list of all the filesystems currently -mounted on the system. With the introduction of per\-process mount -namespaces in Linux 2.4.19, this file became a link to \fI/proc/self/mounts\fP, -which lists the mount points of the process's own mount namespace. The -format of this file is documented in \fBfstab\fP(5). +カーネル 2.4.19 より前では、このファイルは現在システムにマウントされている 全てのファイルシステムのリストであった。 Linux 2.4.19 +でプロセス単位のマウント名前空間が導入されたことに伴い、 このファイルは \fI/proc/self/mounts\fP へのリンクとなった。 +\fI/proc/self/mounts\fP はそのプロセス自身のマウント名前空間のマウントポイントのリストである。 このファイルのフォーマットは +\fBfstab\fP(5) に記述されている。 .TP \fI/proc/mtrr\fP Memory Type Range Registers。 詳細は、Linux カーネルソースファイル \fIDocumentation/mtrr.txt\fP @@ -1643,9 +1639,8 @@ seagate, t128, u15\-24f, ultrastore, wd7000 のどれかである。 少なく (bus lockup) を 制御することができる。 .TP \fI/proc/self\fP -This directory refers to the process accessing the \fI/proc\fP filesystem, and -is identical to the \fI/proc\fP directory named by the process ID of the same -process. +このディレクトリはプロセスに (プロセス自身の) \fI/proc\fP ファイルシステムへのアクセスを参照させる。 これは \fI/proc\fP 内の +(このプロセスの) プロセス ID が名前となっている ディレクトリと全く同一である。 .TP \fI/proc/slabinfo\fP Linux 2.6.16 以降では、 カーネル設定オプション \fBCONFIG_SLAB\fP が有効の場合にのみ、このファイルは存在する。 @@ -1749,10 +1744,10 @@ I/O 完了待ちで停止 (blocked) しているプロセス数 (Linux 2.5.45 使用中のスワップ領域。 \fBswapon\fP(8) も参照すること。 .TP \fI/proc/sys\fP -This directory (present since 1.3.57) contains a number of files and -subdirectories corresponding to kernel variables. These variables can be -read and sometimes modified using the \fI/proc\fP filesystem, and the -(deprecated) \fBsysctl\fP(2) system call. +このディレクトリ (1.3.57 以降に存在) はカーネル変数に対応するいくつかの +ファイルとサブディレクトリを含む。 これらの変数は読み出し可能である。 +また場合によっては \fI/proc\fP ファイルシステムや、 (非推奨の) システムコール +\fBsysctl\fP(2) を用いて書き換えることもできる。 .TP \fI/proc/sys/abi\fP (Linux 2.4.10 以降) .\" On some systems, it is not present. @@ -1767,8 +1762,8 @@ read and sometimes modified using the \fI/proc\fP filesystem, and the このディレクトリが空になっているシステムもある。 .TP \fI/proc/sys/fs\fP -This directory contains the files and subdirectories for kernel variables -related to filesystems. +このディレクトリには、ファイルシステムに関連するカーネル変数用の +ディレクトリとサブディレクトリが含まれる。 .TP \fI/proc/sys/fs/binfmt_misc\fP このディレクトリ以下のファイルについてのドキュメントは、 Linux カーネルソースの \fIDocumentation/binfmt_misc.txt\fP @@ -1839,7 +1834,7 @@ peak in the usage of open file handles. Since Linux 2.6, the kernel does deallocate freed file handles, and the "free file handles" value is always zero. .TP -\fI/proc/sys/fs/inode\-max\fP (only present until Linux 2.2) +\fI/proc/sys/fs/inode\-max\fP (Linux 2.2 までにのみ存在) This file contains the maximum number of in\-memory inodes. This value should be 3\-4 times larger than the value in \fIfile\-max\fP, since \fIstdin\fP, \fIstdout\fP and network sockets also need an inode to handle them. When you @@ -1885,11 +1880,10 @@ system needs to prune the inode list instead of allocating more; since Linux メッセージキューで使用されるリソースの 制御を行う。 詳細は \fBmq_overview\fP(7) を参照。 .TP \fI/proc/sys/fs/overflowgid\fP と \fI/proc/sys/fs/overflowuid\fP -These files allow you to change the value of the fixed UID and GID. The -default is 65534. Some filesystems support only 16\-bit UIDs and GIDs, -although in Linux UIDs and GIDs are 32 bits. When one of these filesystems -is mounted with writes enabled, any UID or GID that would exceed 65535 is -translated to the overflow value before being written to disk. +これらのファイルにより、ユーザーは固定 UID と固定 GID の値を変更できる。 デフォルトは 65534 である。 Linux の UID と +GID は 32 ビットであるが、 16 ビットの UID と GID しかサポートしないファイルシステムもある。 +このようなファイルシステムが書き込みを許可してマウントされた場合、 65535 を超える UID と GID は、 +ディスクに書き込まれる前にオーバーフロー値に変換される。 .TP \fI/proc/sys/fs/pipe\-max\-size\fP (Linux 2.6.35 以降) このファイルの値により、 \fBfcntl\fP(2) の \fBF_SETPIPE_SZ\fP 操作で増やすことができるパイプ容量の上限値が定義される。 @@ -1905,9 +1899,8 @@ translated to the overflow value before being written to disk. .IP * 3 呼び出し元が \fBCAP_FOWNER\fP ケーパビリティを持っている。 .IP * -The filesystem UID of the process creating the link matches the owner (UID) -of the target file (as described in \fBcredentials\fP(7), a process's -filesystem UID is normally the same as its effective UID). +そのリンクを作成中のプロセスのファイルシステム UID が、 リンク先ファイルの所有者 (UID) と一致する (\fBcredentials\fP(7) +に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。 .IP * 以下の条件が全て成立する。 .RS 4 @@ -1939,9 +1932,8 @@ upgraded by the administrator, or linking to special files. より前の伝統的な動作である)。 このファイルの値が 1 の場合、 以下の状況においてのみシンボリックリンクが辿られる。 .RS .IP * 3 -the filesystem UID of the process following the link matches the owner (UID) -of the symbolic link (as described in \fBcredentials\fP(7), a process's -filesystem UID is normally the same as its effective UID); +そのリンクを辿っているプロセスのファイルシステム UID が、 シンボリックリンクの所有者 (UID) と一致する (\fBcredentials\fP(7) +に説明があるが、 通常、 プロセスのファイルシステム UID はプロセスの実効 UID と同じである)。 .IP * そのリンクが world\-writable の sticky ビットがセットされたディレクトリではない。 .IP * @@ -1967,9 +1959,8 @@ races when accessing symbolic links. が変更されているプロセスや、 プロセスの実行バイナリの読み出し許可がないプロセスに対して、 コアダンプを生成しない。 .TP \fI1\ ("debug")\fP -All processes dump core when possible. The core dump is owned by the -filesystem user ID of the dumping process and no security is applied. This -is intended for system debugging situations only. Ptrace is unchecked. +すべてのプロセスで、可能であればコアダンプを行う。 コアダンプファイルの所有者は、ダンプを行うプロセスのファイルシステム UID +となり、セキュリティ上の考慮は行われない。 この値は、システムデバッグの場面だけを想定して設けられている。 ptrace のチェックも行われない。 .TP \fI2\ ("suidsafe")\fP 通常はダンプされないようなバイナリ (上記の "0" 参照) を root だけが読み出し可能な形でダンプする。 @@ -1984,27 +1975,22 @@ is intended for system debugging situations only. Ptrace is unchecked. .RE .TP このファイルはスーパブロックの値を制御する。 -This file controls the maximum number of superblocks, and thus the maximum -number of mounted filesystems the kernel can have. You need increase only -\fIsuper\-max\fP if you need to mount more filesystems than the current value in -\fIsuper\-max\fP allows you to. +この値はカーネルがマウントできるファイルシステムの最大値になる。 現在、 \fIsuper\-max\fP で許可されているファイルシステム数以上に +マウントする必要がある場合は、この値を増加させるだけでよい。 .TP \fI/proc/sys/fs/super\-nr\fP -This file contains the number of filesystems currently mounted. +このファイルには現在マウントされているファイルシステム数が書かれている。 .TP \fI/proc/sys/kernel\fP このディレクトリには、以下で説明する様々なカーネルパラメータを 制御するためのファイルが配置されている。 .TP \fI/proc/sys/kernel/acct\fP -This file contains three numbers: \fIhighwater\fP, \fIlowwater\fP, and -\fIfrequency\fP. If BSD\-style process accounting is enabled these values -control its behavior. If free space on filesystem where the log lives goes -below \fIlowwater\fP percent accounting suspends. If free space gets above -\fIhighwater\fP percent accounting resumes. \fIfrequency\fP determines how often -the kernel checks the amount of free space (value is in seconds). Default -values are 4, 2 and 30. That is, suspend accounting if 2% or less space is -free; resume it if 4% or more space is free; consider information about -amount of free space valid for 30 seconds. +このファイルには 3 つの値が含まれている: \fIhighwater\fP, \fIlowwater\fP, \fIfrequency\fP である。 +BSD\-style process accounting が有効になっている場合、 これら 3 つの値が動作を制御する。 +ログファイルのあるファイルシステムの空き領域が \fIlowwater\fP パーセント以下になった場合は、ログ記録を一時停止する。 空き領域が +\fIhighwater\fP パーセント以上になった場合に、ログ記録を再開する。 \fIfrequency\fP はカーネルが空き領域のチェックをする頻度である +(単位は秒)。 デフォルトの値は、4, 2, 30 である。 つまり、空き領域が 2% 以下になるとログ記録を一時停止し、 空き領域が 4% +以上となったときに再開する。 空き領域についての情報は 30 秒間有効である点に注意すること。 .TP \fI/proc/sys/kernel/cap_last_cap\fP (Linux 3.2 以降) \fBcapabilities\fP(7) 参照。 @@ -2280,8 +2266,8 @@ semantics of the applications using System V shared memory on your system. このディレクトリは空の場合もある。 .TP \fI/proc/sys/sunrpc\fP -This directory supports Sun remote procedure call for network filesystem -(NFS). On some systems, it is not present. +このディレクトリはネットワークファイルシステム (NFS) への Sun remote procedure call (遠隔手続き呼び出し) +をサポートする。 これが存在しないシステムもある。 .TP \fI/proc/sys/vm\fP このディレクトリにはメモリ管理の調整、バッファやキャッシュ管理のための ファイルがある。 diff --git a/draft/man7/capabilities.7 b/draft/man7/capabilities.7 index 688dcf7e..8e0b0ac3 100644 --- a/draft/man7/capabilities.7 +++ b/draft/man7/capabilities.7 @@ -723,6 +723,6 @@ CONFIG_SECURITY_CAPABILITIES により有効/無効を切り替えることが .PP Linux カーネルソース内の \fIinclude/linux/capability.h\fP .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/credentials.7 b/draft/man7/credentials.7 index 5927c0f5..59bfadb7 100644 --- a/draft/man7/credentials.7 +++ b/draft/man7/credentials.7 @@ -154,6 +154,6 @@ POSIX のスレッド仕様では、これらの識別子がプロセス内の \fBeuidaccess\fP(3), \fBinitgroups\fP(3), \fBtcgetpgrp\fP(3), \fBtcsetpgrp\fP(3), \fBcapabilities\fP(7), \fBpath_resolution\fP(7), \fBunix\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/feature_test_macros.7 b/draft/man7/feature_test_macros.7 index 8abd75f7..30e9f9f5 100644 --- a/draft/man7/feature_test_macros.7 +++ b/draft/man7/feature_test_macros.7 @@ -190,14 +190,10 @@ Specification として規定された代替 API (alternative API) に関する \fI_FILE_OFFSET_BITS=64\fP を利用すること。 .TP \fB_FILE_OFFSET_BITS\fP -Defining this macro with the value 64 automatically converts references to -32\-bit functions and data types related to file I/O and filesystem -operations into references to their 64\-bit counterparts. This is useful for -performing I/O on large files (> 2 Gigabytes) on 32\-bit systems. -(Defining this macro permits correctly written programs to use large files -with only a recompilation being required.) 64\-bit systems naturally permit -file sizes greater than 2 Gigabytes, and on those systems this macro has no -effect. +このマクロを値 64 で定義すると、ファイル I/O とファイルシステム操作に 関連する 32 ビット版の関数とデータタイプは自動的に 64 ビット版に +変換される。 これは、32 ビットシステムで大きなファイル (> 2 ギガバイト) の I/O を実行する際に役立つ +(このマクロを定義すると、コンパイルし直すだけで大きなファイルを 扱えるプログラムを書くことができる)。 64 ビットシステムは、もともと 2 +ギガバイトより大きなファイルを 扱えるので、64 ビットシステムではこのマクロは効果を持たない。 .TP \fB_BSD_SOURCE\fP このマクロを定義すると (値に関わらず) ヘッダファイルで BSD 由来の定義が公開される。 @@ -236,20 +232,17 @@ glibc 2.10 以降では、 \fB_POSIX_C_SOURCE\fP が 200809L 以上の値で定 .\" * From: Jakub Jelinek .\" * To: gcc-patches at gcc dot gnu dot org .\" * Date: Tue, 21 Sep 2004 04:16:40 -0400 -Defining this macro causes some lightweight checks to be performed to detect -some buffer overflow errors when employing various string and memory -manipulation functions. Not all buffer overflows are detected, just some -common cases. In the current implementation, checks are added for calls to -\fBmemcpy\fP(3), \fBmempcpy\fP(3), \fBmemmove\fP(3), \fBmemset\fP(3), \fBstpcpy\fP(3), -\fBstrcpy\fP(3), \fBstrncpy\fP(3), \fBstrcat\fP(3), \fBstrncat\fP(3), \fBsprintf\fP(3), -\fBsnprintf\fP(3), \fBvsprintf\fP(3), \fBvsnprintf\fP(3), and \fBgets\fP(3). If -\fB_FORTIFY_SOURCE\fP is set to 1, with compiler optimization level 1 (\fIgcc\ \-O1\fP) and above, checks that shouldn't change the behavior of conforming -programs are performed. With \fB_FORTIFY_SOURCE\fP set to 2 some more checking -is added, but some conforming programs might fail. Some of the checks can -be performed at compile time, and result in compiler warnings; other checks -take place at run time, and result in a run\-time error if the check fails. -Use of this macro requires compiler support, available with \fBgcc\fP(1) since -version 4.0. +このマクロを定義すると、文字列やメモリの操作を行う様々な関数を 使用する際にバッファオーバーフローを検出するための軽めのチェックが +実行されるようになる。すべてのバッファオーバーフローが検出される わけではなく、あくまでよくある例についてだけである。 +現在の実装では、以下の関数にチェックが追加されている: \fBmemcpy\fP(3), \fBmempcpy\fP(3), \fBmemmove\fP(3), +\fBmemset\fP(3), \fBstpcpy\fP(3), \fBstrcpy\fP(3), \fBstrncpy\fP(3), \fBstrcat\fP(3), +\fBstrncat\fP(3), \fBsprintf\fP(3), \fBsnprintf\fP(3), \fBvsprintf\fP(3), +\fBvsnprintf\fP(3), \fBgets\fP(3). \fB_FORTIFY_SOURCE\fP が 1 に設定された場合、コンパイラの最適化レベルが +1 (\fIgcc\ \-O1\fP) かそれ以上であれば、規格に準拠するプログラムの振る舞いを 変化させないようなチェックが実行される。 +\fB_FORTIFY_SOURCE\fP が 2 に設定された場合、さらなるチェックが追加されるが、 +規格に準拠するプログラムのいくつかが失敗する可能性がある。 いくつかのチェックはコンパイル時に実行でき、コンパイラの警告として +表示される。他のチェックは実行時に行われ、チェックに失敗した場合 には実行時エラーとなる。 このマクロを使用するにはコンパイラの対応が必要であり、 +バージョン 4.0 以降の \fBgcc\fP(1) で利用できる。 .SS デフォルトの定義、暗黙の定義、組み合わせ定義 .PP 機能検査マクロが一つも明示的に定義されなかった場合、 デフォルトで機能検査マクロ \fB_BSD_SOURCE\fP, \fB_SVID_SOURCE\fP, diff --git a/draft/man7/fifo.7 b/draft/man7/fifo.7 index 0efa0e56..373dc1b9 100644 --- a/draft/man7/fifo.7 +++ b/draft/man7/fifo.7 @@ -51,6 +51,6 @@ FIFO 特殊ファイルは \fBmkfifo\fP(3) で作成することができ、 \f \fBmkfifo\fP(1), \fBopen\fP(2), \fBpipe\fP(2), \fBsigaction\fP(2), \fBsignal\fP(2), \fBsocketpair\fP(2), \fBmkfifo\fP(3), \fBpipe\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/intro.7 b/draft/man7/intro.7 index 40011cf0..ae769b19 100644 --- a/draft/man7/intro.7 +++ b/draft/man7/intro.7 @@ -40,9 +40,8 @@ .SH 名前 intro \- 概要、慣習やその他の説明 .SH 説明 -Section 7 of the manual provides overviews on various topics, and describes -conventions and protocols, character set standards, the standard filesystem -layout, and miscellaneous other things. +マニュアルの 7 章には様々な事柄の概要が書かれている。 習慣、プロトコル、文字集合の規格、ファイルシステムの構成、 +その他の雑多なことについて説明している。 .SH 注意 .SS 著者と著作権 著者と著作権に関しては各マニュアルページのソースのヘッダを参照すること。 これらはページごとに異なる可能性があることに注意してほしい。 diff --git a/draft/man7/mdoc.7 b/draft/man7/mdoc.7 index 11cfef45..c1770a5e 100644 --- a/draft/man7/mdoc.7 +++ b/draft/man7/mdoc.7 @@ -405,8 +405,8 @@ UR マクロ (URI/URL ハイパーテキスト参照の開始), UE マクロ ( .Xr man 7 , .Xr man-pages 7 .Sh この文書について -This page is part of release 3.54 of the Linux +この man ページは Linux .Em man-pages -project. A -description of the project, and information about reporting bugs, can be -found at \%http://www.kernel.org/doc/man\-pages/. +プロジェクトのリリース 3.54 の +一部である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man-pages/ に書かれている。 diff --git a/draft/man7/mdoc.samples.7 b/draft/man7/mdoc.samples.7 index 5923e757..2bc67f90 100644 --- a/draft/man7/mdoc.samples.7 +++ b/draft/man7/mdoc.samples.7 @@ -2798,8 +2798,8 @@ nroff 使用時に、(最初のヘッダとフッタ以外の) 改ページ時 .Xr groff_mdoc 7 , .Xr mdoc 7 .Sh この文書について -This page is part of release 3.54 of the Linux +この man ページは Linux .Em man-pages -project. A -description of the project, and information about reporting bugs, can be -found at \%http://www.kernel.org/doc/man\-pages/. +プロジェクトのリリース 3.54 の +一部である。プロジェクトの説明とバグ報告に関する情報は +http://www.kernel.org/doc/man-pages/ に書かれている。 diff --git a/draft/man7/path_resolution.7 b/draft/man7/path_resolution.7 index edd3276a..362d42a5 100644 --- a/draft/man7/path_resolution.7 +++ b/draft/man7/path_resolution.7 @@ -83,18 +83,15 @@ levels of symbolic links")。 .SS ". と .." 慣習として、全てのディレクトリはエントリ "." と ".." を持つ。 これらはそれぞれ、そのディレクトリ自身とその親ディレクトリを参照する。 -The path resolution process will assume that these entries have their -conventional meanings, regardless of whether they are actually present in -the physical filesystem. +パス解決過程では、これらのエントリが物理的なファイルシステムに 実際に存在するか否かに関わらず、慣習的な意味を持つと仮定する。 ルートより上に辿ることはできない: "/.." は "/" と同じである。 .SS マウント位置 -After a "mount dev path" command, the pathname "path" refers to the root of -the filesystem hierarchy on the device "dev", and no longer to whatever it -referred to earlier. +"mount dev path" コマンドを実行した後、 パス名 "path" はデバイス "dev" 上のファイルシステム階層の +ルートディレクトリを参照するようになり、以前の位置を参照しない。 -One can walk out of a mounted filesystem: "path/.." refers to the parent -directory of "path", outside of the filesystem hierarchy on "dev". +マウントされたファイルシステムの外に出ることができる: "path/.." は "dev" 上のファイルシステム階層の外である "path" +の親ディレクトリを参照する。 .SS 末尾のスラッシュ パス名が \(aq/\(aq で終わっている場合、 ステップ 2 において、その前にある構成要素の解決法を次のように強制する: その構成要素が存在しなければならず、ディレクトリとして解決される。 存在しない場合は、末尾の \(aq/\(aq が無視される。 (また同様に、末尾に @@ -122,14 +119,13 @@ directory of "path", outside of the filesystem hierarchy on "dev". Linux は、許可のチェックにおいて、実効ユーザ ID ではなく fsuid を使う。 通常は fsuid は実効ユーザ ID と等しいが、fsuid はシステムコール \fBsetfsuid\fP(2) で変更することができる。 -(Here "fsuid" stands for something like "filesystem user ID". The concept -was required for the implementation of a user space NFS server at a time -when processes could send a signal to a process with the same effective user -ID. It is obsolete now. Nobody should use \fBsetfsuid\fP(2).) +(ここで "fsuid" は "file system user ID" を表している。 この概念は「プロセスが同じ実効ユーザ ID を持つプロセスに +同時にシグナルを送ることができる」というユーザ空間 NFS サーバを 実装する際に必要であった。 これは今では廃れてしまった。 +\fBsetfsuid\fP(2) を使うべきではない。 .\" FIXME say something about filesystem mounted read-only ? -Similarly, Linux uses the fsgid ("filesystem group ID") instead of the -effective group ID. See \fBsetfsgid\fP(2). +同様に、Linux では実効グループ ID の代わりに fsgid ("ファイルシステム・グループID") を使う。 \fBsetfsgid\fP(2) +を参照すること。 .SS "許可の確認をスキップする: スーパーユーザとケーパビリティ" .\" (but for exec at least one x bit must be set) -- AEB .\" but there is variation across systems on this point: for diff --git a/draft/man7/pipe.7 b/draft/man7/pipe.7 index 60f8e4f9..1c998856 100644 --- a/draft/man7/pipe.7 +++ b/draft/man7/pipe.7 @@ -114,6 +114,6 @@ POSIX.1\-2001 では、パイプは一方向の通信だけに対応していれ \fBdup\fP(2), \fBfcntl\fP(2), \fBopen\fP(2), \fBpipe\fP(2), \fBpoll\fP(2), \fBselect\fP(2), \fBsocketpair\fP(2), \fBstat\fP(2), \fBmkfifo\fP(3), \fBepoll\fP(7), \fBfifo\fP(7) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/svipc.7 b/draft/man7/svipc.7 index cb0564f9..3b9ca4a5 100644 --- a/draft/man7/svipc.7 +++ b/draft/man7/svipc.7 @@ -265,6 +265,6 @@ struct shmid_ds { \fBmsgrcv\fP(2), \fBmsgsnd\fP(2), \fBsemctl\fP(2), \fBsemget\fP(2), \fBsemop\fP(2), \fBshmat\fP(2), \fBshmctl\fP(2), \fBshmdt\fP(2), \fBshmget\fP(2), \fBftok\fP(3) .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。 diff --git a/draft/man7/uri.7 b/draft/man7/uri.7 index 730096bc..809ded83 100644 --- a/draft/man7/uri.7 +++ b/draft/man7/uri.7 @@ -491,6 +491,6 @@ URI に、そのプロトコルに対するデリミタがエスケープされ IETF RFC\ 2255 .UE .SH この文書について -この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.53 の一部 +この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部 である。プロジェクトの説明とバグ報告に関する情報は http://www.kernel.org/doc/man\-pages/ に書かれている。