-.\" Hey Emacs! This file is -*- nroff -*- source.
-.\"
.\" Copyright (c) 1993 by Thomas Koenig <ig25@rz.uni-karlsruhe.de>
.\" and Copyright (c) 2004 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
+.\" %%%LICENSE_START(VERBATIM)
.\" Permission is granted to make and distribute verbatim copies of this
.\" manual provided the copyright notice and this permission notice are
.\" preserved on all copies.
.\"
.\" Formatted or processed versions of this manual, if unaccompanied by
.\" the source, must acknowledge the copyright and authors of this work.
-.\" License.
+.\" %%%LICENSE_END
.\"
.\" Modified Sat Jul 24 13:30:06 1993 by Rik Faith <faith@cs.unc.edu>
.\" Modified Sun Aug 21 17:42:42 1994 by Rik Faith <faith@cs.unc.edu>
.\" This file was generated with po4a. Translate the source file.
.\"
.\"*******************************************************************
-.TH WAIT 2 2010\-09\-26 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 書式
\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) 参照):
\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 バグ
+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() の使用方法の例を示している。 このプログラムでは子プロセスを生成する。
\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.40 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
である。プロジェクトの説明とバグ報告に関する情報は
http://www.kernel.org/doc/man\-pages/ に書かれている。