.\" Copyright (c) 1994 Mike Battersby .\" .\" %%%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. .\" .\" 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. .\" %%%LICENSE_END .\" .\" Modified by aeb, 960721 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(), .\" and sigorset() .\" 2007-10-26 mdw added wording that a sigset_t must be initialized .\" prior to use .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .\" .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya .\" all rights reserved. .\" Translated 1998-05-24, HANATAKA Shinya .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16 .\" Updated 2008-02-09, Akihiro MOTOKI , LDP v2.77 .\" .TH SIGSETOPS 3 2014\-04\-14 Linux "Linux Programmer's Manual" .SH 名前 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX シグナル集合の操作 .SH 書式 \fB#include \fP .sp \fBint sigemptyset(sigset_t *\fP\fIset\fP\fB);\fP .sp \fBint sigfillset(sigset_t *\fP\fIset\fP\fB);\fP .sp \fBint sigaddset(sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP .sp \fBint sigdelset(sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP .sp \fBint sigismember(const sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP .sp .in -4n glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7) 参照): .in .sp .ad l \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP(), \fBsigismember\fP(): .RS 4 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE .RE .ad b .SH 説明 これらの関数は POSIX シグナル集合(signal set)を操作するため使用する。 .PP \fBsigemptyset\fP() は \fIset\fP で与えられたシグナル集合を空に初期化し、シグナルが一つも 含まれていない状態にする。 .PP \fBsigfillset\fP() は \fIset\fP で与えられたシグナル集合が全てのシグナルを含むようにする。 .PP \fBsigaddset\fP() と \fBsigdelset\fP() は \fIset\fP に \fIsignum\fP シグナルをそれぞれ加えたり、削除したりする。 .PP \fBsigismember\fP() は \fIsignum\fP が \fIset\fP に含まれているかどうかをテストする。 .PP \fIsigset_t\fP 型のオブジェクトは、関数 \fBsigaddset\fP(), \fBsigdelset\fP(), \fBsigismember\fP() や後述の glibc の追加関数 (\fBsigisemptyset\fP(), \fBsigandset\fP(), \fBsigorset\fP()) に渡す前に、 \fBsigemptyset\fP() か \fBsigfillset\fP() を呼び出して初期化しなければならない。 初期化しなかった場合の結果は未定義である。 .SH 返り値 \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP() は成功すれば 0 を、エラーの場合は \-1 を返す。 .PP \fBsigismember\fP() は \fIsignum\fP が \fIset\fP のメンバの場合 1 を返し、メンバでない場合 0 を返す。 エラーの場合、\-1 を返す。 エラーの場合、 \fIerrno\fP にエラーの原因を示す値を設定する。 .SH エラー .TP \fBEINVAL\fP \fIsig\fP が有効なシグナルではない。 .SH 属性 .SS "マルチスレッディング (pthreads(7) 参照)" 関数 \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP(), \fBsigismember\fP(), \fBsigisemptyset\fP(), \fBsigorset\fP(), \fBsigandset\fP() はスレッドセーフである。 .SH 準拠 POSIX.1\-2001. .SH 注意 .SS "glibc での注意" \fB_GNU_SOURCE\fP 機能検査マクロが定義されていると、 \fI\fP でシグナル集合を操作する 3 つの関数が追加で公開される。 .nf \fBint sigisemptyset(const sigset_t *\fP\fIset\fP\fB);\fP \fBint sigorset(sigset_t *\fP\fIdest\fP\fB, const sigset_t *\fP\fIleft\fP\fB,\fP \fB const sigset_t *\fP\fIright\fP\fB);\fP \fBint sigandset(sigset_t *\fP\fIdest\fP\fB, const sigset_t *\fP\fIleft\fP\fB,\fP \fB const sigset_t *\fP\fIright\fP\fB);\fP .fi \fBsigisemptyset\fP() は \fIset\fP にシグナルが一つも含まれていなければ 1 を返し、 それ以外は 0 を返す。 \fBsigorset\fP() は集合 \fIleft\fP と \fIright\fP の和集合を \fIdest\fP に設定する。 \fBsigandset\fP() は集合 \fIleft\fP と \fIright\fP の積集合を \fIdest\fP に設定する。 どちらの関数も成功すると 0 を返し、失敗時には \-1 を返す。 .PP これらの関数は非標準であり、(他にも同様の関数を提供しているシステムも いくつかはあるが) 移植性を考慮したアプリケーションでは使用を避けるべき である。 .SH 関連項目 \fBsigaction\fP(2), \fBsigpending\fP(2), \fBsigprocmask\fP(2), \fBsigsuspend\fP(2) .SH この文書について この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.79 の一部である。 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。