OSDN Git Service

(split) LDP: Translate several pages
[linuxjm/LDP_man-pages.git] / draft / man2 / wait.2
index f9e8b97..57b8d3b 100644 (file)
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH WAIT 2 2012\-12\-21 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya all rights reserved.
+.\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
+.\" Translated 1997-03-04, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Modified 2000-09-23, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
+.\" Updated 2001-06-25, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2001-10-15, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2001-12-13, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2002-10-21, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2003-01-27, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2003-09-12, Kentaro Shirakata <argrath@ub32.org>
+.\" Updated 2005-03-19, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
+.\" Updated 2005-12-26, Akihiro MOTOKI
+.\" Updated 2008-07-31, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH WAIT 2 2013\-09\-04 Linux "Linux Programmer's Manual"
 .SH 名前
 wait, waitpid, waitid \- プロセスの状態変化を待つ
 .SH 書式
@@ -63,8 +79,9 @@ wait, waitpid, waitid \- プロセスの状態変化を待つ
 
 \fBpid_t waitpid(pid_t \fP\fIpid\fP\fB, int *\fP\fIstatus\fP\fB, int \fP\fIoptions\fP\fB);\fP
 
-\fBint waitid(idtype_t \fP\fIidtype\fP\fB, id_t \fP\fIid\fP\fB, siginfo_t *\fP\fIinfop\fP\fB,
-int \fP\fIoptions\fP\fB);\fP
+\fBint waitid(idtype_t \fP\fIidtype\fP\fB, id_t \fP\fIid\fP\fB, siginfo_t *\fP\fIinfop\fP\fB, int \fP\fIoptions\fP\fB);\fP
+                /* これは glibc と POSIX のインターフェイスである。
+                   生のシステムコールについての情報は「注意」の節を参照。 */
 .sp
 .in -4n
 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
@@ -291,12 +308,15 @@ Linux 2.4 より前では、スレッドは単に特殊なプロセスであっ
 \fB__WNOTHREAD\fP (Linux 2.4 以降)
 .\" since patch-2.4.0-test8
 同じスレッドグループの他のスレッドの子プロセスは待たない。 Linux 2.4 より前ではデフォルトであった。
+.PP
+生の \fBwaitid\fP() システムコールは \fIstruct rusage\ *\fP 型の第 5 引数を取る。 この引数が NULL 以外の場合、
+この引数が子プロセスのリソース使用状況を返すのに使用される。 これは \fBwait4\fP(2) と同じ方法である。 詳細は \fBgetrusage\fP(2)
+を参照。
 .SH バグ
-According to POSIX.1\-2008, an application calling \fBwaitid\fP()  must ensure
-that \fIinfop\fP points to a \fIsiginfo_t\fP structure (i.e., that it is a
-non\-NULL pointer).  On Linux, if \fIinfop\fP is NULL, \fBwaitid\fP()  succeeds,
-and returns the process ID of the waited\-for child.  Applications should
-avoid relying on this inconsistent, nonstandard, and unnecessary feature.
+POSIX.1\-2008 によると、 \fBwaitid\fP() を呼び出すアプリケーションは、 \fIinfop\fP が \fIsiginfo_t\fP
+構造体を指していること (つまり \fIinfop\fP が NULL でないポインタであること) を保証しなければならない。 Linux では、
+\fIinfop\fP が NULL の場合、 \fBwaitid\fP() は成功し、wait している子プロセスのプロセス ID を返す。
+アプリケーションは、この食い違った、非標準で、不必要な機能に依存しないようにすべきである。
 .SH 例
 .\" fork.2 refers to this example program.
 以下のプログラムは、 \fBfork\fP(2)  と \fBwaitpid\fP()  の使用方法の例を示している。 このプログラムでは子プロセスを生成する。
@@ -375,6 +395,6 @@ main(int argc, char *argv[])
 \fBsigaction\fP(2), \fBsignal\fP(2), \fBwait4\fP(2), \fBpthread_create\fP(3),
 \fBcredentials\fP(7), \fBsignal\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.51 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。