.\" Copyright (c) 2008, Linux Foundation, written by Michael Kerrisk .\" .\" .\" 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. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one. .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Japanese Version Copyright (c) 2008 Akihiro MOTOKI .\" all rights reserved. .\" Translated 2008-08-21, Akihiro MOTOKI , LDP v3.04 .\" .TH SIGWAIT 3 2009-02-10 "Linux" "Linux Programmer's Manual" .\"O .SH NAME .SH 名前 .\"O sigwait \- wait for a signal sigwait \- シグナルを待つ .\"O .SH SYNOPSIS .SH 書式 .nf .B #include .BI " int sigwait(const sigset_t *" set ", int *" sig ); .fi .sp .in -4n .\"O Feature Test Macro Requirements for glibc (see .\"O .BR feature_test_macros (7)): glibc 向けの機能検査マクロの要件 .RB ( feature_test_macros (7) 参照): .in .sp .ad l .BR sigwait (): _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE .ad b .\"O .SH DESCRIPTION .SH 説明 .\"O The .\"O .BR sigwait () .\"O function suspends execution of the calling thread until the .\"O delivery of one of the signals specified in the signal set .\"O .IR set . .\"O The function accepts the signal .\"O (removes it from the pending list of signals), .\"O and returns the signal number in .\"O .IR sig . .BR sigwait () 関数は、シグナル集合 .I set で指定されたシグナルの一つが配送されるまで、 呼び出したスレッドの実行を中断する。 この関数はそのシグナルを受け取り (つまり、処理待ちのシグナルのリスト からそのシグナルを削除し)、そのシグナル番号を .I sig に格納して返す。 .\"O The operation of .\"O .BR sigwait () .\"O is the same as .\"O .BR sigwaitinfo (), .\"O except that: .BR sigwait () の動作は .BR sigwaitinfo () と同じだが、以下の点が異なる。 .IP * 2 .\"O .BR sigwait () .\"O only returns the signal number, rather than a .\"O .I siginfo_t .\"O structure describing the signal. .BR sigwait () は、シグナルの内容を表す .I siginfo_t 構造体を返すのではなく、単にシグナル番号を返す。 .IP * .\"O The return values of the two functions are different. 返り値が .BR sigwaitinfo () とは異なる。 .\"O .SH RETURN VALUE .SH 返り値 .\"O On success, .\"O .BR sigwait () .\"O returns 0. .\"O On error, it returns a positive error number. 成功すると、 .BR sigwait () は 0 を返す。 エラーの場合、直前のエラー番号を返す。 .\"O .SH ERRORS .SH エラー .TP .B EINVAL .\" Does not occur for glibc. .\"O .I set .\"O contains an invalid signal number. .I set に無効なシグナル番号が入っている。 .\"O .SH CONFORMING TO .SH 準拠 POSIX.1-2001. .\"O .SH NOTES .SH 注意 .\"O .BR sigwait () .\"O is implemented using .\"O .BR sigtimedwait (2). .BR sigwait () は .BR sigtimedwait (2) を使って実装されている。 .\"O .SH EXAMPLES .SH 例 .\"O See .\"O .BR pthread_sigmask (3). .BR pthread_sigmask (3) を参照。 .\"O .SH SEE ALSO .SH 関連項目 .BR sigaction (2), .BR signalfd (2), .BR sigpending (2), .BR sigsuspend (2), .BR sigwaitinfo (2), .BR sigsetops (3), .BR signal (7)