OSDN Git Service

(split) LDP: Update release pages based on LDP 3.54 release
[linuxjm/LDP_man-pages.git] / release / man2 / sigwaitinfo.2
index 0b0d0ec..6345b0a 100644 (file)
 .\" This file was generated with po4a. Translate the source file.
 .\"
 .\"*******************************************************************
-.TH SIGWAITINFO 2 2012\-07\-21 Linux "Linux Programmer's Manual"
+.\"
+.\" Japanese Version Copyright (c) 2003 Yuichi SATO
+.\"         all rights reserved.
+.\" Translated 2003-02-16, Yuichi SATO <ysato444@yahoo.co.jp>
+.\" Updated 2006-07-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
+.\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
+.\" Updated 2012-05-29, Akihiro MOTOKI <amotoki@gmail.com>
+.\" Updated 2013-05-06, Akihiro MOTOKI <amotoki@gmail.com>
+.\"
+.TH SIGWAITINFO 2 2013\-09\-04 Linux "Linux Programmer's Manual"
 .SH 名前
 sigwaitinfo, sigtimedwait \- キューに入れられたシグナルを同期して待つ
 .SH 書式
@@ -46,25 +55,23 @@ glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参
 .sp
 \fBsigwaitinfo\fP(), \fBsigtimedwait\fP(): _POSIX_C_SOURCE\ >=\ 199309L
 .SH 説明
-\fBsigwaitinfo\fP()  suspends execution of the calling thread until one of the
-signals in \fIset\fP is pending (If one of the signals in \fIset\fP is already
-pending for the calling thread, \fBsigwaitinfo\fP()  will return immediately.)
+\fBsigwaitinfo\fP()  は \fIset\fP のうちのどれかのシグナルが処理待ちになるまで、 呼び出しスレッドの実行を一時停止する
+(呼び出しスレッドに対して \fIset\fP のうちのどれかのシグナルが既に待機中 (pending) である場合、 \fBsigwaitinfo\fP()
+はすぐに戻る)。
 
-\fBsigwaitinfo\fP()  removes the signal from the set of pending signals and
-returns the signal number as its function result.  If the \fIinfo\fP argument
-is not NULL, then the buffer that it points to is used to return a structure
-of type \fIsiginfo_t\fP (see \fBsigaction\fP(2))  containing information about the
-signal.
+\fBsigwaitinfo\fP()  はそのシグナルを待機中のシグナルの集合から削除し、関数の結果としてシグナル番号を返す。 \fIinfo\fP 引き数が
+NULL でない場合、配送されたシグナルの情報が入った \fIsiginfo_t\fP 型 (\fBsigaction\fP(2)  を参照) の構造体を
+\fIinfo\fP が指すバッファに入れて返す。
 .PP
-If multiple signals in \fIset\fP are pending for the caller, the signal that is
-retrieved by \fBsigwaitinfo\fP()  is determined according to the usual ordering
-rules; see \fBsignal\fP(7)  for further details.
+呼び出し元に対して \fIset\fP の複数のシグナルが処理待ちの場合、 \fBsigwaitinfo\fP()
+で取得するシグナルは通常の順序決定ルールに基づいて決定される。 詳細は \fBsignal\fP(7) を参照のこと。
 .PP
-\fBsigtimedwait\fP() は、 \fBsigwaitinfo\fP() と次の点を除いて全く同じように
-動作する。この関数にはもう 1 つの引き数 \fItimeout\fP があり、シグナル待ち
-でスレッドが一時停止する最小時間を指定することができる(この時間はシステ
-ムクロックの粒度に切り上げられ、カーネルのスケジューリング遅延により
-少しだけ長くなる可能性がある)。この引き数の型は以下のとおりである:
+\fBsigtimedwait\fP()  operates in exactly the same way as \fBsigwaitinfo\fP()
+except that it has an additional argument, \fItimeout\fP, which specifies the
+interval for which the thread is suspended waiting for a signal.  (This
+interval will be rounded up to the system clock granularity, and kernel
+scheduling delays mean that the interval may overrun by a small amount.)
+This argument is of the following type:
 .sp
 .in +4n
 .nf
@@ -83,8 +90,7 @@ struct timespec {
 .SH エラー
 .TP 
 \fBEAGAIN\fP
-No signal in \fIset\fP was became pending within the \fItimeout\fP period
-specified to \fBsigtimedwait\fP().
+\fIset\fP のうちのどのシグナルも \fBsigtimedwait\fP()  に指定された \fItimeout\fP の期間内に処理待ちにならなかった。
 .TP 
 \fBEINTR\fP
 シグナル待ちがシグナルハンドラによって中断 (interrupt) された (このハンドラは \fIset\fP にあるシグナル以外のものである)。
@@ -95,24 +101,20 @@ specified to \fBsigtimedwait\fP().
 .SH 準拠
 POSIX.1\-2001.
 .SH 注意
-In normal usage, the calling program blocks the signals in \fIset\fP via a
-prior call to \fBsigprocmask\fP(2)  (so that the default disposition for these
-signals does not occur if they become pending between successive calls to
-\fBsigwaitinfo\fP()  or \fBsigtimedwait\fP())  and does not establish handlers for
-these signals.  In a multithreaded program, the signal should be blocked in
-all threads, in order to prevent the signal being treated according to its
-default disposition in a thread other than the one calling \fBsigwaitinfo\fP()
-or \fBsigtimedwait\fP()).
+通常の使用法では、呼び出し側プロセスはこれらの関数より先に \fBsigprocmask\fP(2)  の呼び出すことにより \fIset\fP
+に含まれるシグナルをブロックし (そのためにこれらのシグナルがこの後に続く \fBsigwaitinfo\fP()  や \fBsigtimedwait\fP()
+の呼び出しの間に処理待ちになった場合には、デフォルトの動作は行われず)、 これらのシグナルに対するハンドラは設定しない。 マルチスレッドプログラムでは、
+\fBsigwaitinfo\fP()  や \fBsigtimedwait\fP()
+を呼び出したスレッド以外のスレッドで、そのシグナルがデフォルトの動作に基いて処理されないように、全てのスレッドで該当シグナルをブロックすべきである。
 
 指定されたスレッドに対する処理待ちのシグナルの集合は、 そのスレッド自体宛ての処理待ちのシグナル集合と、プロセス全体宛ての
 処理待ちのシグナル集合をあわせたものである (\fBsignal\fP(7)  参照)。
 
 \fBSIGKILL\fP と \fBSIGSTOP\fP を待とうとした場合、黙って無視される。
 
-If multiple threads of a process are blocked waiting for the same signal(s)
-in \fBsigwaitinfo\fP()  or \fBsigtimedwait\fP(), then exactly one of the threads
-will actually receive the signal if it becomes pending for the process as a
-whole; which of the threads receives the signal is indeterminate.
+一つのプロセス内の複数のスレッドが \fBsigwaitinfo\fP()  や \fBsigtimedwait\fP()  で同じシグナルを待って停止した場合、
+プロセス全体宛てのシグナルが処理待ちになると、複数のスレッドのうち一つだけが 実際にそのシグナルを受信することになる。
+どのスレッドがシグナルを受信するかは決まっていない。
 
 POSIX では \fBsigtimedwait\fP()  の引き数 \fItimeout\fP の値を NULL にした場合の意味を未定義としている。
 \fBsigwaitinfo\fP()  を呼び出したのと同じ意味としてもよいことになっており、 実際 Linux ではこのように動作する。
@@ -123,6 +125,6 @@ Linux では、 \fBsigwaitinfo\fP()  は \fBsigtimedwait\fP()  を用いて実
 \fBsigprocmask\fP(2), \fBsigqueue\fP(3), \fBsigsetops\fP(3), \fBsigwait\fP(3),
 \fBsignal\fP(7), \fBtime\fP(7)
 .SH この文書について
-この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.50 の一部
+この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.54 の一部
 である。プロジェクトの説明とバグ報告に関する情報は
 http://www.kernel.org/doc/man\-pages/ に書かれている。