OSDN Git Service

(split) Convert release and draft pages to UTF-8.
[linuxjm/LDP_man-pages.git] / draft / man2 / sigwaitinfo.2
index 4caa29b..d384c1c 100644 (file)
 .\" Updated 2006-07-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
 .\" Updated 2008-08-07, Akihiro MOTOKI, LDP v3.05
 .\"
-.\"WORD:       pending         ÂÔµ¡Ãæ¤Ç¤¢¤ë
+.\"WORD:       pending         待機中である
 .\"
 .TH SIGWAITINFO 2 2011-10-03 "Linux" "Linux Programmer's Manual"
 .\"O .SH NAME
-.SH Ì¾Á°
+.SH 名前
 .\"O sigwaitinfo, sigtimedwait \- synchronously wait for queued signals
-sigwaitinfo, sigtimedwait \- ¥­¥å¡¼¤ËÆþ¤ì¤é¤ì¤¿¥·¥°¥Ê¥ë¤òƱ´ü¤·¤ÆÂÔ¤Ä
+sigwaitinfo, sigtimedwait \- キューに入れられたシグナルを同期して待つ
 .\"O .SH SYNOPSIS
-.SH ½ñ¼°
+.SH 書式
 .nf
 .B #include <signal.h>
 .sp
@@ -47,42 +47,42 @@ sigwaitinfo, sigtimedwait \- 
 .in -4n
 .\"O Feature Test Macro Requirements for glibc (see
 .\"O .BR feature_test_macros (7)):
-glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
+glibc 向けの機能検査マクロの要件
 .RB ( feature_test_macros (7)
-»²¾È):
+参照):
 .in
 .sp
 .BR sigwaitinfo (),
 .BR sigtimedwait ():
 _POSIX_C_SOURCE\ >=\ 199309L
 .\"O .SH DESCRIPTION
-.SH ÀâÌÀ
+.SH 説明
 .\"O .BR sigwaitinfo ()
 .\"O suspends execution of the calling thread until one of the signals in
 .\"O .I set
 .\"O is delivered.
 .BR sigwaitinfo ()
-¤Ï
+は
 .I set
-¤Î¤¦¤Á¤Î¤É¤ì¤«¤Î¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤ë¤Þ¤Ç¡¢
-¸Æ¤Ó½Ð¤·¥¹¥ì¥Ã¥É¤Î¼Â¹Ô¤ò°ì»þÄä»ß¤¹¤ë
+のうちのどれかのシグナルが配送されるまで、
+呼び出しスレッドの実行を一時停止する
 .\"O (If one of the signals in
 .\"O .I set
 .\"O is already pending for the calling thread,
 .\"O .BR sigwaitinfo ()
 .\"O will return immediately with information about that signal.)
-(¸Æ¤Ó½Ð¤·¥¹¥ì¥Ã¥É¤ËÂФ·¤Æ
+(呼び出しスレッドに対して
 .I set
-¤Î¤¦¤Á¤Î¤É¤ì¤«¤Î¥·¥°¥Ê¥ë¤¬´û¤ËÂÔµ¡Ãæ (pending) ¤Ç¤¢¤ë¾ì¹ç¡¢
+のうちのどれかのシグナルが既に待機中 (pending) である場合、
 .BR sigwaitinfo ()
-¤Ï¤½¤Î¥·¥°¥Ê¥ë¤Î¾ðÊó¤òÊÖ¤·¤Æ¤¹¤°¤ËÌá¤ë)¡£
+はそのシグナルの情報を返してすぐに戻る)。
 .PP
 .\"O .BR sigwaitinfo ()
 .\"O removes the delivered signal from the set of pending
 .\"O signals and returns the signal number as its function result.
 .BR sigwaitinfo ()
-¤ÏÇÛÁ÷¤µ¤ì¤¿¥·¥°¥Ê¥ë¤òÂÔµ¡Ãæ¤Î¥·¥°¥Ê¥ë¤Î½¸¹ç¤«¤éºï½ü¤·¡¢
-´Ø¿ô¤Î·ë²Ì¤È¤·¤Æ¥·¥°¥Ê¥ëÈÖ¹æ¤òÊÖ¤¹¡£
+は配送されたシグナルを待機中のシグナルの集合から削除し、
+関数の結果としてシグナル番号を返す。
 .\"O If the
 .\"O .I info
 .\"O argument is not NULL,
@@ -92,11 +92,11 @@ _POSIX_C_SOURCE\ >=\ 199309L
 .\"O .BR sigaction (2))
 .\"O containing information about the signal.
 .I info
-°ú¤­¿ô¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç¡¢ÇÛÁ÷¤µ¤ì¤¿¥·¥°¥Ê¥ë¤Î¾ðÊó¤¬Æþ¤Ã¤¿
+引き数が NULL でない場合、配送されたシグナルの情報が入った
 .I siginfo_t
-·¿
+型
 .RB ( sigaction (2)
-¤ò»²¾È) ¤Î¹½Â¤ÂΤòÊÖ¤¹¡£
+を参照) の構造体を返す。
 .PP
 .\"O Signals returned via
 .\"O .BR sigwaitinfo ()
@@ -104,10 +104,10 @@ _POSIX_C_SOURCE\ >=\ 199309L
 .\"O .BR signal (7)
 .\"O for further details.
 .BR sigwaitinfo ()
-¤ÇÊÖ¤µ¤ì¤ë¥·¥°¥Ê¥ë¤Ï¡¢Ä̾ï¤Î½çÈÖ¤ÇÇÛÁ÷¤µ¤ì¤ë¡£
-¾ÜºÙ¤Ï
+で返されるシグナルは、通常の順番で配送される。
+詳細は
 .BR signal (7)
-¤ò»²¾È¤¹¤ë¤³¤È¡£
+を参照すること。
 .PP
 .\"O .BR sigtimedwait ()
 .\"O operates in exactly the same way as
@@ -117,28 +117,28 @@ _POSIX_C_SOURCE\ >=\ 199309L
 .\"O which enables an upper bound to be placed on the time for which
 .\"O the thread is suspended.
 .BR sigtimedwait ()
-¤Ï¡¢
+は、
 .BR sigwaitinfo ()
-¤È¼¡¤ÎÅÀ¤ò½ü¤¤¤ÆÁ´¤¯Æ±¤¸¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
-¤³¤Î´Ø¿ô¤Ë¤Ï¤â¤¦ 1 ¤Ä¤Î°ú¤­¿ô
+と次の点を除いて全く同じように動作する。
+この関数にはもう 1 つの引き数
 .I timeout
-¤¬¤¢¤ê¡¢¥¹¥ì¥Ã¥É¤¬°ì»þÄä»ß¤¹¤ë»þ´Ö¤Î¾å¸Â¤òÄê¤á¤ë¤³¤È¤¬¤Ç¤­¤ë¡£
+があり、スレッドが一時停止する時間の上限を定めることができる。
 .\"O This argument is of the following type:
-¤³¤Î°ú¤­¿ô¤Î·¿¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¢¤ë:
+この引き数の型は以下のとおりである:
 .sp
 .in +4n
 .nf
 struct timespec {
 .\"O     long    tv_sec;         /* seconds */
-    long    tv_sec;         /* Éà*/
+    long    tv_sec;         /*  */
 .\"O     long    tv_nsec;        /* nanoseconds */
-    long    tv_nsec;        /* ¥Ê¥ÎÉà*/
+    long    tv_nsec;        /* ナノ秒 */
 }
 .fi
 .in
 .sp
 .\"O If both fields of this structure are specified as 0, a poll is performed:
-¤³¤Î¹½Â¤ÂΤΠ2 ¤Ä¤Î¥Õ¥£¡¼¥ë¥É¤¬¤È¤â¤Ë 0 ¤Î¾ì¹ç¡¢¥Ý¡¼¥ê¥ó¥°¤¬¹Ô¤ï¤ì¤ë:
+この構造体の 2 つのフィールドがともに 0 の場合、ポーリングが行われる:
 .\"O .BR sigtimedwait ()
 .\"O returns immediately, either with information about a signal that
 .\"O was pending for the caller, or with an error
@@ -146,30 +146,30 @@ struct timespec {
 .\"O .I set
 .\"O was pending.
 .BR sigtimedwait ()
-¤Ï¡¢¸Æ¤Ó½Ð¤·Â¦¥×¥í¥»¥¹¤ËÂФ·¤Æ
-ÂÔµ¡¤·¤Æ¤¤¤ë¥·¥°¥Ê¥ë¤Î¾ðÊó¤òÊÖ¤·¤ÆÌá¤ë¤«¡¢
+は、呼び出し側プロセスに対して
+待機しているシグナルの情報を返して戻るか、
 .I set
-¤Î¤¦¤Á¤Î¤É¤Î¥·¥°¥Ê¥ë¤âÂÔµ¡¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ï¥¨¥é¡¼¤òÊÖ¤·¤ÆÌá¤ë¡£
+のうちのどのシグナルも待機していない場合はエラーを返して戻る。
 .\"O .SH "RETURN VALUE"
-.SH ÊÖ¤êÃÍ
+.SH 返り値
 .\"O On success, both
 .\"O .BR sigwaitinfo ()
 .\"O and
 .\"O .BR sigtimedwait ()
 .\"O return a signal number (i.e., a value greater than zero).
-À®¸ù¤·¤¿¾ì¹ç¡¢
+成功した場合、
 .BR sigwaitinfo ()
-¤È
+と
 .BR sigtimedwait ()
-¤Ï¥·¥°¥Ê¥ëÈÖ¹æ (¤¹¤Ê¤ï¤Á 0 ¤è¤êÂ礭¤¤¿ô) ¤òÊÖ¤¹¡£
+はシグナル番号 (すなわち 0 より大きい数) を返す。
 .\"O On failure both calls return \-1, with
 .\"O .I errno
 .\"O set to indicate the error.
-¼ºÇÔ¤·¤¿¾ì¹ç¡¢2 ¤Ä¤Î´Ø¿ô¤Ï \-1 ¤òÊÖ¤·¡¢
+失敗した場合、2 つの関数は \-1 を返し、
 .I errno
-¤Ï¥¨¥é¡¼¤òɽ¤¹ÃͤËÀßÄꤵ¤ì¤ë¡£
+はエラーを表す値に設定される。
 .\"O .SH ERRORS
-.SH ¥¨¥é¡¼
+.SH ã\82¨ã\83©ã\83¼
 .TP
 .B EAGAIN
 .\"O No signal in
@@ -179,34 +179,34 @@ struct timespec {
 .\"O period specified to
 .\"O .BR sigtimedwait ().
 .I set
-¤Î¤¦¤Á¤Î¤É¤Î¥·¥°¥Ê¥ë¤â
+のうちのどのシグナルも
 .BR sigtimedwait ()
-¤Ë»ØÄꤵ¤ì¤¿
+に指定された
 .I timeout
-¤Î´ü´ÖÆâ¤ËÇÛÁ÷¤µ¤ì¤Ê¤«¤Ã¤¿¡£
+の期間内に配送されなかった。
 .TP
 .B EINTR
 .\"O The wait was interrupted by a signal handler; see
 .\"O .BR signal (7).
 .\"O (This handler was for a signal other than one of those in
 .\"O .IR set .)
-¥·¥°¥Ê¥ëÂÔ¤Á¤¬¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Ë¤è¤Ã¤ÆÃæÃÇ (interrupt) ¤µ¤ì¤¿
-(¤³¤Î¥Ï¥ó¥É¥é¤Ï
+シグナル待ちがシグナルハンドラによって中断 (interrupt) された
+(このハンドラは
 .I set
-¤Ë¤¢¤ë¥·¥°¥Ê¥ë°Ê³°¤Î¤â¤Î¤Ç¤¢¤ë)¡£
+にあるシグナル以外のものである)。
 .BR signal (7)
-»²¾È¡£
+参照。
 .TP
 .B EINVAL
 .\"O .I timeout
 .\"O was invalid.
 .I timeout
-¤¬ÉÔÀµ¤Ç¤¢¤ë¡£
+が不正である。
 .\"O .SH "CONFORMING TO"
-.SH ½àµò
+.SH 準拠
 POSIX.1-2001.
 .\"O .SH NOTES
-.SH Ãí°Õ
+.SH 注意
 .\"O In normal usage, the calling program blocks the signals in
 .\"O .I set
 .\"O via a prior call to
@@ -217,40 +217,40 @@ POSIX.1-2001.
 .\"O or
 .\"O .BR sigtimedwait())
 .\"O and does not establish handlers for these signals.
-Ä̾ï¤Î»ÈÍÑË¡¤Ç¤Ï¡¢¸Æ¤Ó½Ð¤·Â¦¥×¥í¥»¥¹¤Ï¤³¤ì¤é¤Î´Ø¿ô¤è¤êÀè¤Ë
+通常の使用法では、呼び出し側プロセスはこれらの関数より先に
 .BR sigprocmask (2)
-¤Î¸Æ¤Ó½Ð¤¹¤³¤È¤Ë¤è¤ê
+の呼び出すことにより
 .I set
-¤Ë´Þ¤Þ¤ì¤ë¥·¥°¥Ê¥ë¤ò¥Ö¥í¥Ã¥¯¤·
-(¤½¤Î¤¿¤á¤Ë¤³¤ì¤é¤Î¥·¥°¥Ê¥ë¤¬¤³¤Î¸å¤Ë³¤¯
+に含まれるシグナルをブロックし
+(そのためにこれらのシグナルがこの後に続く
 .BR sigwaitinfo ()
-¤ä
+や
 .BR sigtimedwait ()
-¤Î¸Æ¤Ó½Ð¤·¤Î´Ö¤ËÇÛÁ÷¤µ¤ì¤¿¾ì¹ç¤Ë¤Ï¡¢
-¥Ç¥Õ¥©¥ë¥È¤ÎÇÛÃ֤ϹԤï¤ì¤º)¡¢
-¤³¤ì¤é¤Î¥·¥°¥Ê¥ë¤ËÂФ¹¤ë¥Ï¥ó¥É¥é¤ÏÀßÄꤷ¤Ê¤¤¡£
+の呼び出しの間に配送された場合には、
+デフォルトの配置は行われず)、
+これらのシグナルに対するハンドラは設定しない。
 .\"O In a multithreaded program,
 .\"O the signal should be blocked in all threads to prevent
 .\"O the signal being delivered to a thread other than the one calling
 .\"O .BR sigwaitinfo ()
 .\"O or
 .\"O .BR sigtimedwait ()).
-¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¥×¥í¥°¥é¥à¤Ç¤Ï¡¢
+マルチスレッドプログラムでは、
 .BR sigwaitinfo ()
-¤ä
+や
 .BR sigtimedwait ()
-¤ò¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É°Ê³°¤Î¥¹¥ì¥Ã¥É¤Ë¤½¤Î¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤Ê¤¤¤è¤¦¤Ë¡¢
-Á´¤Æ¤Î¥¹¥ì¥Ã¥É¤Ç³ºÅö¥·¥°¥Ê¥ë¤ò¥Ö¥í¥Ã¥¯¤¹¤Ù¤­¤Ç¤¢¤ë¡£
+を呼び出したスレッド以外のスレッドにそのシグナルが配送されないように、
+全てのスレッドで該当シグナルをブロックすべきである。
 
 .\"O The set of signals that is pending for a given thread is the
 .\"O union of the set of signals that is pending specifically for that thread
 .\"O and the set of signals that is pending for the process as a whole (see
 .\"O .BR signal (7)).
-»ØÄꤵ¤ì¤¿¥¹¥ì¥Ã¥É¤ËÂФ¹¤ë½èÍýÂÔ¤Á¤Î¥·¥°¥Ê¥ë¤Î½¸¹ç¤Ï¡¢
-¤½¤Î¥¹¥ì¥Ã¥É¼«Âΰ¸¤Æ¤Î½èÍýÂÔ¤Á¤Î¥·¥°¥Ê¥ë½¸¹ç¤È¡¢¥×¥í¥»¥¹Á´Âΰ¸¤Æ¤Î
-½èÍýÂÔ¤Á¤Î¥·¥°¥Ê¥ë½¸¹ç¤ò¤¢¤ï¤»¤¿¤â¤Î¤Ç¤¢¤ë
+指定されたスレッドに対する処理待ちのシグナルの集合は、
+そのスレッド自体宛ての処理待ちのシグナル集合と、プロセス全体宛ての
+処理待ちのシグナル集合をあわせたものである
 .RB ( signal (7)
-»²¾È)¡£
+参照)。
 
 .\"O Attempts to wait for
 .\"O .B SIGKILL
@@ -258,9 +258,9 @@ POSIX.1-2001.
 .\"O .B SIGSTOP
 .\"O are silently ignored.
 .B SIGKILL
-¤È
+と
 .B SIGSTOP
-¤òÂԤȤ¦¤È¤·¤¿¾ì¹ç¡¢ÌۤäÆ̵»ë¤µ¤ì¤ë¡£
+を待とうとした場合、黙って無視される。
 
 .\"O If multiple threads of a process are blocked
 .\"O waiting for the same signal(s) in
@@ -270,14 +270,14 @@ POSIX.1-2001.
 .\"O then exactly one of the threads will actually receive the
 .\"O signal if it is delivered to the process as a whole;
 .\"O which of the threads receives the signal is indeterminate.
-°ì¤Ä¤Î¥×¥í¥»¥¹Æâ¤ÎÊ£¿ô¤Î¥¹¥ì¥Ã¥É¤¬
+一つのプロセス内の複数のスレッドが
 .BR sigwaitinfo ()
-¤ä
+や
 .BR sigtimedwait ()
-¤ÇƱ¤¸¥·¥°¥Ê¥ë¤òÂԤäÆÄä»ß¤·¤¿¾ì¹ç¡¢
-¥×¥í¥»¥¹Á´Âΰ¸¤Æ¤Î¥·¥°¥Ê¥ë¤¬ÇÛÁ÷¤µ¤ì¤ë¤È¡¢Ê£¿ô¤Î¥¹¥ì¥Ã¥É¤Î¤¦¤Á°ì¤Ä¤À¤±¤¬
-¼ÂºÝ¤Ë¤½¤Î¥·¥°¥Ê¥ë¤ò¼õ¿®¤¹¤ë¤³¤È¤Ë¤Ê¤ë¡£
-¤É¤Î¥¹¥ì¥Ã¥É¤¬¥·¥°¥Ê¥ë¤ò¼õ¿®¤¹¤ë¤«¤Ï·è¤Þ¤Ã¤Æ¤¤¤Ê¤¤¡£
+で同じシグナルを待って停止した場合、
+プロセス全体宛てのシグナルが配送されると、複数のスレッドのうち一つだけが
+実際にそのシグナルを受信することになる。
+どのスレッドがシグナルを受信するかは決まっていない。
 
 .\"O POSIX leaves the meaning of a NULL value for the
 .\"O .I timeout
@@ -287,26 +287,26 @@ POSIX.1-2001.
 .\"O as a call to
 .\"O .BR sigwaitinfo (),
 .\"O and indeed this is what is done on Linux.
-POSIX ¤Ç¤Ï
+POSIX では
 .BR sigtimedwait ()
-¤Î°ú¤­¿ô
+の引き数
 .I timeout
-¤ÎÃͤò NULL ¤Ë¤·¤¿¾ì¹ç¤Î°ÕÌ£¤ò̤ÄêµÁ¤È¤·¤Æ¤¤¤ë¡£
+の値を NULL にした場合の意味を未定義としている。
 .BR sigwaitinfo ()
-¤ò¸Æ¤Ó½Ð¤·¤¿¤Î¤ÈƱ¤¸°ÕÌ£¤È¤·¤Æ¤â¤è¤¤¤³¤È¤Ë¤Ê¤Ã¤Æ¤ª¤ê¡¢
-¼ÂºÝ Linux ¤Ç¤Ï¤³¤Î¤è¤¦¤ËÆ°ºî¤¹¤ë¡£
+を呼び出したのと同じ意味としてもよいことになっており、
+実際 Linux ではこのように動作する。
 
 .\"O On Linux,
 .\"O .BR sigwaitinfo ()
 .\"O is a library function implemented on top of
 .\"O .BR sigtimedwait ().
-Linux ¤Ç¤Ï¡¢
+Linux では、
 .BR sigwaitinfo ()
-¤Ï
+は
 .BR sigtimedwait ()
-¤òÍѤ¤¤Æ¼ÂÁõ¤µ¤ì¤¿¥é¥¤¥Ö¥é¥ê´Ø¿ô¤Ç¤¢¤ë¡£
+を用いて実装されたライブラリ関数である。
 .\"O .SH "SEE ALSO"
-.SH ´ØÏ¢¹àÌÜ
+.SH 関連項目
 .BR kill (2),
 .BR sigaction (2),
 .BR signal (2),