OSDN Git Service

(split) LDP: Update release pages based on LDP 3.54 release
[linuxjm/LDP_man-pages.git] / release / man2 / pivot_root.2
index 6e2b1da..19067a0 100644 (file)
 .\" Copyright (C) 2000 by Werner Almesberger
+.\"
+.\" %%%LICENSE_START(GPL_NOVERSION_ONELINE)
 .\" May be distributed under GPL
+.\" %%%LICENSE_END
 .\"
 .\" Written 2000-02-23 by Werner Almesberger
 .\" Modified 2004-06-17 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
+.\"*******************************************************************
+.\"
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.\"
 .\" Japanese Version Copyright (c) 2000 NAKANO Takeo all rights reserved.
 .\" Translated Wed Jun 14 2000 by NAKANO Takeo <nakano@apm.seikei.ac.jp>
 .\"
-.TH PIVOT_ROOT 2 2007-06-01 "Linux" "Linux Programmer's Manual"
+.TH PIVOT_ROOT 2 2012\-07\-13 Linux "Linux Programmer's Manual"
 .SH 名前
-pivot_root \- root ファイルシステムを変更する
+pivot_root \- change the root filesystem
 .SH 書式
-.BI "int pivot_root(const char *" new_root ", const char *" put_old );
+\fBint pivot_root(const char *\fP\fInew_root\fP\fB, const char *\fP\fIput_old\fP\fB);\fP
+
+\fI注\fP: このシステムコールには glibc のラッパー関数は存在しない。「注意」の節を参照。
 .SH 説明
-.BR pivot_root ()
-は呼び出し元のプロセスの root ファイルシステムを
-.I put_old
-ディレクトリに移動し、
-.I new_root
-を呼び出し元のプロセスの新しい root ファイルシステムにする。
 .\"
+.\" The
 .\" .B CAP_SYS_ADMIN
-.\" ケーパビリティが必要である。
+.\" capability is required.
+\fBpivot_root\fP()  moves the root filesystem of the calling process to the
+directory \fIput_old\fP and makes \fInew_root\fP the new root filesystem of the
+calling process.
 
-.BR pivot_root ()
-の典型的な利用法は、システムの起動中にシステムが一時的な
-root ファイルシステム (例えば
-.BR initrd )
-をマウントし、これに続いて本当の root ファイルシステムをマウントし、
-後者を必要な全てのプロセス・スレッドの
-カレント root に変更するような場合である。
+The typical use of \fBpivot_root\fP()  is during system startup, when the
+system mounts a temporary root filesystem (e.g., an \fBinitrd\fP), then mounts
+the real root filesystem, and eventually turns the latter into the current
+root of all relevant processes or threads.
 
-古い root ディレクトリを使っていた全てのプロセスやスレッドの
-カレント root とカレントワーキングディレクトリを、
-.BR pivot_root ()
-が変更するかどうかはわからない。
-.BR pivot_root ()
-の呼びだしプロセスは、古い root やカレントワーキングディレクトリを使っていた
-プロセスが、いずれの場合でも正しく動作することを保証しなければならない。
-これを簡単に行うには、それらのプロセスの root と
-カレントワーキングディレクトリを
-.BR pivot_root ()
-を呼び出す前に
-.I new_root
-に変更しておくことである。
+古い root ディレクトリを使っていた全てのプロセスやスレッドの カレント root とカレントワーキングディレクトリを、
+\fBpivot_root\fP()  が変更するかどうかはわからない。 \fBpivot_root\fP()  の呼びだしプロセスは、古い root
+やカレントワーキングディレクトリを使っていた プロセスが、いずれの場合でも正しく動作することを保証しなければならない。
+これを簡単に行うには、それらのプロセスの root と カレントワーキングディレクトリを \fBpivot_root\fP()  を呼び出す前に
+\fInew_root\fP に変更しておくことである。
 
-上記の段落は、将来
-.BR pivot_root ()
-が変更されるかも知れないことを鑑みて、わざと曖昧に書いてある。
-本ページを記述している時点では、
-.BR pivot_root ()
-は古い root ディレクトリを用いている全てのプロセス・スレッドの root と
-カレントワーキングディレクトリを
-.I new_root
-に変更する。これはカーネルのスレッドが古い root ディレクトリを
-busy 状態にしないために必要である。これらのスレッドが
-古いディレクトリを root やカレントワーキングディレクトリとしていると、
-ファイルシステムに一切アクセスしない場合でも
-古い root が busy になってしまうからである。
-.\"nakano: ちと冗長...
-将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを
-明示的に放棄するメカニズムができ、このでしゃばりな機能は
-.BR pivot_root ()
-から削除されるかもしれない。
+The paragraph above is intentionally vague because the implementation of
+\fBpivot_root\fP()  may change in the future.  At the time of writing,
+\fBpivot_root\fP()  changes root and current working directory of each process
+or thread to \fInew_root\fP if they point to the old root directory.  This is
+necessary in order to prevent kernel threads from keeping the old root
+directory busy with their root and current working directory, even if they
+never access the filesystem in any way.  In the future, there may be a
+mechanism for kernel threads to explicitly relinquish any access to the
+filesystem, such that this fairly intrusive mechanism can be removed from
+\fBpivot_root\fP().
 
-これは呼び出し元のプロセスについても当てはまることに注意。
-.BR pivot_root ()
-がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは
-分からない。したがって
-.BR pivot_root ()
-の直後に
-.B chdir("/")
-を呼び出すとよい。
+これは呼び出し元のプロセスについても当てはまることに注意。 \fBpivot_root\fP()
+がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分からない。したがって \fBpivot_root\fP()  の直後に
+\fBchdir("/")\fP を呼び出すとよい。
 
-.IR new_root " および " put_old
-には以下の制限がある:
+\fInew_root\fP および \fIput_old\fP には以下の制限がある:
 .IP \- 3
 ディレクトリでなければならない。
 .IP \- 3
-.IR new_root " と " put_old
-は現在の root と同じファイルシステムにあってはならない。
+\fInew_root\fP and \fIput_old\fP must not be on the same filesystem as the current
+root.
 .IP \- 3
-.IR put_old " は " new_root
-以下になければならない。すなわち
-.I put_old
-を差す文字列に 1 個以上の
-.I ../
-を付けることによって
-.I new_root
-と同じディレクトリが得られなければならない。
+\fIput_old\fP は \fInew_root\fP 以下になければならない。すなわち \fIput_old\fP を差す文字列に 1 個以上の \fI../\fP
+を付けることによって \fInew_root\fP と同じディレクトリが得られなければならない。
 .IP \- 3
-他のファイルシステムが
-.I put_old
-にマウントされていてはならない。
+No other filesystem may be mounted on \fIput_old\fP.
 .PP
-利用例については
-.BR pivot_root (8)
-を参照のこと。
+利用例については \fBpivot_root\fP(8)  を参照のこと。
 
-現在の root がマウントポイントではない
-.RB ( chroot (2)
-や
-.BR pivot_root ()
-の後など。以下も参照) 場合、
-古い root ディレクトリではなく、
-そのファイルシステムのマウントポイントが
-.I put_old
-にマウントされる。
+If the current root is not a mount point (e.g., after \fBchroot\fP(2)  or
+\fBpivot_root\fP(), see also below), not the old root directory, but the mount
+point of that filesystem is mounted on \fIput_old\fP.
 
-.I new_root
-はマウントポイントでなくてもよい。
-この場合
-.I /proc/mounts
-は、
-.I new_root
-を root
-.RI ( / )
-とするファイルシステムのマウントポイントを表示する。
+\fInew_root\fP does not have to be a mount point.  In this case,
+\fI/proc/mounts\fP will show the mount point of the filesystem containing
+\fInew_root\fP as root (\fI/\fP).
 .SH 返り値
-成功すると 0 を返す。エラーが起ると \-1 を返し、
-.I errno
-が適切な値に設定される。
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
 .SH エラー
-.BR pivot_root ()
-は
-.BR stat (2)
-の返すあらゆるエラーを
-.RI ( errno
-に) 返す可能性がある。さらに以下を返すことがある:
-.TP
-.B EBUSY
-.IR new_root " または " put_old
-が、現在の root ファイルシステム上にあるか、既に
-.I put_old
-になんらかのファイルシステムがマウントされている。
-.TP
-.B EINVAL
-.IR put_old " が " new_root
-の下層にない。
-.TP
-.B ENOTDIR
-.IR new_root " または " put_old
-がディレクトリでない。
-.TP
-.B EPERM
-呼び出し元のプロセスが
-.B CAP_SYS_ADMIN
-ケーパビリティを持っていない。
+\fBpivot_root\fP()  は \fBstat\fP(2)  の返すあらゆるエラーを (\fIerrno\fP に)
+返す可能性がある。さらに以下を返すことがある:
+.TP 
+\fBEBUSY\fP
+\fInew_root\fP or \fIput_old\fP are on the current root filesystem, or a
+filesystem is already mounted on \fIput_old\fP.
+.TP 
+\fBEINVAL\fP
+\fIput_old\fP が \fInew_root\fP の下層にない。
+.TP 
+\fBENOTDIR\fP
+\fInew_root\fP または \fIput_old\fP がディレクトリでない。
+.TP 
+\fBEPERM\fP
+呼び出し元のプロセスが \fBCAP_SYS_ADMIN\fP ケーパビリティを持っていない。
 .SH バージョン
-.BR pivot_root ()
-は Linux 2.3.41 で導入された。
+\fBpivot_root\fP()  は Linux 2.3.41 で導入された。
 .SH 準拠
-.BR pivot_root ()
-は Linux に固有のものなので、移植性はない。
+\fBpivot_root\fP()  は Linux に固有のものなので、移植性はない。
 .SH 注意
-glibc はこのシステムコールに対するラッパー関数を提供していない。
-.BR syscall (2)
-を使って呼び出すこと。
+glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
 .SH バグ
-.BR pivot_root ()
-はシステムの他のプロセス全ての root と
-カレントワーキングディレクトリとを変更しなくてもよいはずである。
+\fBpivot_root\fP()  はシステムの他のプロセス全ての root と カレントワーキングディレクトリとを変更しなくてもよいはずである。
 
-.BR pivot_root ()
-の使い方がもうちょっと曖昧になると、
-あっという間にわけのわからない状態になってしまうだろう
+\fBpivot_root\fP()  の使い方がもうちょっと曖昧になると、 あっという間にわけのわからない状態になってしまうだろう
 .SH 関連項目
-.BR chdir (2),
-.BR chroot (2),
-.BR stat (2),
-.BR initrd (4),
-.BR pivot_root (8)
+\fBchdir\fP(2), \fBchroot\fP(2), \fBstat\fP(2), \fBinitrd\fP(4), \fBpivot_root\fP(8)
+.SH この文書について
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
+である。プロジェクトの説明とバグ報告に関する情報は
+http://www.kernel.org/doc/man\-pages/ に書かれている。