OSDN Git Service

(split) LDP: draft snapshot generated from latest ja.po files.
[linuxjm/LDP_man-pages.git] / draft / man2 / pivot_root.2
index 20d3cd2..3ab5e49 100644 (file)
 .\" Written 2000-02-23 by Werner Almesberger
 .\" Modified 2004-06-17 Michael Kerrisk <mtk.manpages@gmail.com>
 .\"
-.\" 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"
-.\"O .SH NAME
-.\"O pivot_root \- change the root file system
+.\" This file was generated with po4a. Translate the source file.
+.\"
+.\"*******************************************************************
+.TH PIVOT_ROOT 2 2007\-06\-01 Linux "Linux Programmer's Manual"
 .SH 名前
 pivot_root \- root ファイルシステムを変更する
-.\"O .SH SYNOPSIS
 .SH 書式
-.BI "int pivot_root(const char *" new_root ", const char *" put_old );
-.\"O .SH DESCRIPTION
+\fBint pivot_root(const char *\fP\fInew_root\fP\fB, const char *\fP\fIput_old\fP\fB);\fP
 .SH 説明
-.\"O .BR pivot_root ()
-.\"O moves the root file system of the calling process to the
-.\"O directory \fIput_old\fP and makes \fInew_root\fP the new root file system
-.\"O of the calling process.
-.BR pivot_root ()
-は呼び出し元のプロセスの root ファイルシステムを
-.I put_old
-ディレクトリに移動し、
-.I new_root
-を呼び出し元のプロセスの新しい root ファイルシステムにする。
-.\"O .\"
-.\"O .\" The
-.\"O .\" .B CAP_SYS_ADMIN
-.\"O .\" capability is required.
 .\"
+.\" The
 .\" .B CAP_SYS_ADMIN
-.\" ケーパビリティが必要である。
+.\" capability is required.
+\fBpivot_root\fP()  は呼び出し元のプロセスの root ファイルシステムを \fIput_old\fP ディレクトリに移動し、
+\fInew_root\fP を呼び出し元のプロセスの新しい root ファイルシステムにする。
 
-.\"O The typical use of
-.\"O .BR pivot_root ()
-.\"O is during system startup, when the
-.\"O system mounts a temporary root file system (e.g., an \fBinitrd\fP), then
-.\"O mounts the real root file system, and eventually turns the latter into
-.\"O the current root of all relevant processes or threads.
-.BR pivot_root ()
-の典型的な利用法は、システムの起動中にシステムが一時的な
-root ファイルシステム (例えば
-.BR initrd )
-をマウントし、これに続いて本当の root ファイルシステムをマウントし、
-後者を必要な全てのプロセス・スレッドの
-カレント root に変更するような場合である。
+\fBpivot_root\fP()  の典型的な利用法は、システムの起動中にシステムが一時的な root ファイルシステム (例えば \fBinitrd\fP)
+をマウントし、これに続いて本当の root ファイルシステムをマウントし、 後者を必要な全てのプロセス・スレッドの カレント root
+に変更するような場合である。
 
-.\"O .BR pivot_root ()
-.\"O may or may not change the current root and the current
-.\"O working directory of any processes or threads which use the old
-.\"O root directory.
-.\"O The caller of
-.\"O .BR pivot_root ()
-.\"O must ensure that processes with root or current working directory
-.\"O at the old root operate correctly in either case.
-.\"O An easy way to ensure this is to change their
-.\"O root and current working directory to \fInew_root\fP before invoking
-.\"O .BR pivot_root ().
-古い 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 に変更しておくことである。
 
-.\"O The paragraph above is intentionally vague because the implementation
-.\"O of
-.\"O .BR pivot_root ()
-.\"O may change in the future.
-.\"O At the time of writing,
-.\"O .BR pivot_root ()
-.\"O changes root and current working directory of each process or
-.\"O thread to \fInew_root\fP if they point to the old root directory.
-.\"O This
-.\"O is necessary in order to prevent kernel threads from keeping the old
-.\"O root directory busy with their root and current working directory,
-.\"O even if they never access
-.\"O the file system in any way.
-.\"O In the future, there may be a mechanism for
-.\"O kernel threads to explicitly relinquish any access to the file system,
-.\"O such that this fairly intrusive mechanism can be removed from
-.\"O .BR pivot_root ().
-上記の段落は、将来
-.BR pivot_root ()
-が変更されるかも知れないことを鑑みて、わざと曖昧に書いてある。
-本ページを記述している時点では、
-.BR pivot_root ()
-は古い root ディレクトリを用いている全てのプロセス・スレッドの root と
-カレントワーキングディレクトリを
-.I new_root
-に変更する。これはカーネルのスレッドが古い root ディレクトリを
-busy 状態にしないために必要である。これらのスレッドが
-古いディレクトリを root やカレントワーキングディレクトリとしていると、
-ファイルシステムに一切アクセスしない場合でも
-古い root が busy になってしまうからである。
-.\"nakano: ちと冗長...
-将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを
-明示的に放棄するメカニズムができ、このでしゃばりな機能は
-.BR pivot_root ()
-から削除されるかもしれない。
+上記の段落は、将来 \fBpivot_root\fP()  が変更されるかも知れないことを鑑みて、わざと曖昧に書いてある。 本ページを記述している時点では、
+\fBpivot_root\fP()  は古い root ディレクトリを用いている全てのプロセス・スレッドの root と カレントワーキングディレクトリを
+\fInew_root\fP に変更する。これはカーネルのスレッドが古い root ディレクトリを busy 状態にしないために必要である。これらのスレッドが
+古いディレクトリを root やカレントワーキングディレクトリとしていると、 ファイルシステムに一切アクセスしない場合でも 古い root が busy
+になってしまうからである。 将来は、カーネルスレッドがあらゆるファイルシステムへのアクセスを 明示的に放棄するメカニズムができ、このでしゃばりな機能は
+\fBpivot_root\fP()  から削除されるかもしれない。
 
-.\"O Note that this also applies to the calling process:
-.\"O .BR pivot_root ()
-.\"O may
-.\"O or may not affect its current working directory.
-.\"O It is therefore recommended to call
-.\"O \fBchdir("/")\fP immediately after
-.\"O .BR pivot_root ().
-これは呼び出し元のプロセスについても当てはまることに注意。
-.BR pivot_root ()
-がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは
-分からない。したがって
-.BR pivot_root ()
-の直後に
-.B chdir("/")
-を呼び出すとよい。
+これは呼び出し元のプロセスについても当てはまることに注意。 \fBpivot_root\fP()
+がカレントプロセスのカレントワーキングディレクトリに影響するかどうかは 分からない。したがって \fBpivot_root\fP()  の直後に
+\fBchdir("/")\fP を呼び出すとよい。
 
-.\"O The following restrictions apply to \fInew_root\fP and \fIput_old\fP:
-.IR new_root " および " put_old
-には以下の制限がある:
+\fInew_root\fP および \fIput_old\fP には以下の制限がある:
 .IP \- 3
-.\"O They must be directories.
 ディレクトリでなければならない。
 .IP \- 3
-.\"O \fInew_root\fP and \fIput_old\fP must not be on the same file system as
-.\"O the current root.
-.IR new_root " と " put_old
-は現在の root と同じファイルシステムにあってはならない。
+\fInew_root\fP と \fIput_old\fP は現在の root と同じファイルシステムにあってはならない。
 .IP \- 3
-.\"O \fIput_old\fP must be underneath \fInew_root\fP, that is, adding a nonzero
-.\"O number of \fI/..\fP to the string pointed to by \fIput_old\fP must yield
-.\"O the same directory as \fInew_root\fP.
-.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
-.\"O No other file system may be mounted on \fIput_old\fP.
-他のファイルシステムが
-.I put_old
-にマウントされていてはならない。
+他のファイルシステムが \fIput_old\fP にマウントされていてはならない。
 .PP
-.\"O See also
-.\"O .BR pivot_root (8)
-.\"O for additional usage examples.
-利用例については
-.BR pivot_root (8)
-を参照のこと。
+利用例については \fBpivot_root\fP(8)  を参照のこと。
 
-.\"O If the current root is not a mount point (e.g., after
-.\"O .BR chroot (2)
-.\"O or
-.\"O .BR pivot_root (),
-.\"O see also below), not the old root directory, but the
-.\"O mount point of that file system is mounted on \fIput_old\fP.
-現在の root がマウントポイントではない
-.RB ( chroot (2)
-や
-.BR pivot_root ()
-の後など。以下も参照) 場合、
-古い root ディレクトリではなく、
-そのファイルシステムのマウントポイントが
-.I put_old
-にマウントされる。
+現在の root がマウントポイントではない (\fBchroot\fP(2)  や \fBpivot_root\fP()  の後など。以下も参照) 場合、 古い
+root ディレクトリではなく、 そのファイルシステムのマウントポイントが \fIput_old\fP にマウントされる。
 
-.\"O \fInew_root\fP does not have to be a mount point.
-.\"O In this case,
-.\"O \fI/proc/mounts\fP will show the mount point of the file system containing
-.\"O \fInew_root\fP as root (\fI/\fP).
-.I new_root
-はマウントポイントでなくてもよい。
-この場合
-.I /proc/mounts
-は、
-.I new_root
-を root
-.RI ( / )
-とするファイルシステムのマウントポイントを表示する。
-.\"O .SH "RETURN VALUE"
+\fInew_root\fP はマウントポイントでなくてもよい。 この場合 \fI/proc/mounts\fP は、 \fInew_root\fP を root
+(\fI/\fP)  とするファイルシステムのマウントポイントを表示する。
 .SH 返り値
-.\"O On success, zero is returned.
-.\"O On error, \-1 is returned, and
-.\"O \fIerrno\fP is set appropriately.
-成功すると 0 を返す。エラーが起ると \-1 を返し、
-.I errno
-が適切な値に設定される。
-.\"O .SH ERRORS
+成功した場合は 0 が返される。エラーの場合は \-1 が返され、 \fIerrno\fP が適切に設定される。
 .SH エラー
-.\"O .BR pivot_root ()
-.\"O may return (in \fIerrno\fP) any of the errors returned by
-.\"O .BR stat (2).
-.\"O Additionally, it may return:
-.BR pivot_root ()
-は
-.BR stat (2)
-の返すあらゆるエラーを
-.RI ( errno
-に) 返す可能性がある。さらに以下を返すことがある:
-.TP
-.B EBUSY
-.\"O \fInew_root\fP or \fIput_old\fP are on the current root file system,
-.\"O or a file system is already mounted on \fIput_old\fP.
-.IR new_root " または " put_old
-が、現在の root ファイルシステム上にあるか、既に
-.I put_old
+\fBpivot_root\fP()  は \fBstat\fP(2)  の返すあらゆるエラーを (\fIerrno\fP に)
+返す可能性がある。さらに以下を返すことがある:
+.TP 
+\fBEBUSY\fP
+\fInew_root\fP または \fIput_old\fP が、現在の root ファイルシステム上にあるか、既に \fIput_old\fP
 になんらかのファイルシステムがマウントされている。
-.TP
-.B EINVAL
-.\"O \fIput_old\fP is not underneath \fInew_root\fP.
-.IR put_old " が " new_root
-の下層にない。
-.TP
-.B ENOTDIR
-.\"O \fInew_root\fP or \fIput_old\fP is not a directory.
-.IR new_root " または " put_old
-がディレクトリでない。
-.TP
-.B EPERM
-.\"O The calling process does not have the
-.\"O .B CAP_SYS_ADMIN
-.\"O capability.
-呼び出し元のプロセスが
-.B CAP_SYS_ADMIN
-ケーパビリティを持っていない。
-.\"O .SH VERSIONS
+.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 バージョン
-.\"O .BR pivot_root ()
-.\"O was introduced in Linux 2.3.41.
-.BR pivot_root ()
-は Linux 2.3.41 で導入された。
-.\"O .SH "CONFORMING TO"
+\fBpivot_root\fP()  は Linux 2.3.41 で導入された。
 .SH 準拠
-.\"O .BR pivot_root ()
-.\"O is Linux-specific and hence is not portable.
-.BR pivot_root ()
-は Linux に固有のものなので、移植性はない。
-.\"O .SH NOTES
+\fBpivot_root\fP()  は Linux に固有のものなので、移植性はない。
 .SH 注意
-.\"O Glibc does not provide a wrapper for this system call; call it using
-.\"O .BR syscall (2).
-glibc はこのシステムコールに対するラッパー関数を提供していない。
-.BR syscall (2)
-を使って呼び出すこと。
-.\"O .SH BUGS
+glibc はこのシステムコールに対するラッパー関数を提供していない。 \fBsyscall\fP(2)  を使って呼び出すこと。
 .SH バグ
-.\"O .BR pivot_root ()
-.\"O should not have to change root and current working directory of all other
-.\"O processes in the system.
-.BR pivot_root ()
-はシステムの他のプロセス全ての root と
-カレントワーキングディレクトリとを変更しなくてもよいはずである。
+\fBpivot_root\fP()  はシステムの他のプロセス全ての root と カレントワーキングディレクトリとを変更しなくてもよいはずである。
 
-.\"O Some of the more obscure uses of
-.\"O .BR pivot_root ()
-.\"O may quickly lead to
-.\"O insanity.
-.BR pivot_root ()
-の使い方がもうちょっと曖昧になると、
-あっという間にわけのわからない状態になってしまうだろう
-.\"O .SH "SEE ALSO"
+\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)