OSDN Git Service

Update release for LDP 3.67
[linuxjm/LDP_man-pages.git] / release / man3 / sigsetops.3
1 .\" Copyright (c) 1994 Mike Battersby
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified by aeb, 960721
26 .\" 2005-11-21, mtk, added descriptions of sigisemptyset(), sigandset(),
27 .\"                  and sigorset()
28 .\" 2007-10-26 mdw   added wording that a sigset_t must be initialized
29 .\"                  prior to use
30 .\"
31 .\"*******************************************************************
32 .\"
33 .\" This file was generated with po4a. Translate the source file.
34 .\"
35 .\"*******************************************************************
36 .\"
37 .\" Japanese Version Copyright (c) 1998 HANATAKA Shinya
38 .\"         all rights reserved.
39 .\" Translated 1998-05-24, HANATAKA Shinya <hanataka@abyss.rim.or.jp>
40 .\" Updated 2005-12-05, Akihiro MOTOKI, Catch up to LDP man-pages 2.16
41 .\" Updated 2008-02-09, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.77
42 .\"
43 .TH SIGSETOPS 3 2014\-04\-14 Linux "Linux Programmer's Manual"
44 .SH 名前
45 sigemptyset, sigfillset, sigaddset, sigdelset, sigismember \- POSIX シグナル集合の操作
46 .SH 書式
47 \fB#include <signal.h>\fP
48 .sp
49 \fBint sigemptyset(sigset_t *\fP\fIset\fP\fB);\fP
50 .sp
51 \fBint sigfillset(sigset_t *\fP\fIset\fP\fB);\fP
52 .sp
53 \fBint sigaddset(sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP
54 .sp
55 \fBint sigdelset(sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP
56 .sp
57 \fBint sigismember(const sigset_t *\fP\fIset\fP\fB, int \fP\fIsignum\fP\fB);\fP
58 .sp
59 .in -4n
60 glibc 向けの機能検査マクロの要件 (\fBfeature_test_macros\fP(7)  参照):
61 .in
62 .sp
63 .ad l
64 \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP(),
65 \fBsigismember\fP():
66 .RS 4
67 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
68 .RE
69 .ad b
70 .SH 説明
71 これらの関数は POSIX シグナル集合(signal set)を操作するため使用する。
72 .PP
73 \fBsigemptyset\fP()  は \fIset\fP で与えられたシグナル集合を空に初期化し、シグナルが一つも 含まれていない状態にする。
74 .PP
75 \fBsigfillset\fP()  は \fIset\fP で与えられたシグナル集合が全てのシグナルを含むようにする。
76 .PP
77 \fBsigaddset\fP()  と \fBsigdelset\fP()  は \fIset\fP に \fIsignum\fP
78 シグナルをそれぞれ加えたり、削除したりする。
79 .PP
80 \fBsigismember\fP()  は \fIsignum\fP が \fIset\fP に含まれているかどうかをテストする。
81 .PP
82 \fIsigset_t\fP 型のオブジェクトは、関数 \fBsigaddset\fP(), \fBsigdelset\fP(), \fBsigismember\fP()
83 や後述の glibc の追加関数 (\fBsigisemptyset\fP(), \fBsigandset\fP(), \fBsigorset\fP())  に渡す前に、
84 \fBsigemptyset\fP()  か \fBsigfillset\fP()  を呼び出して初期化しなければならない。
85 初期化しなかった場合の結果は未定義である。
86 .SH 返り値
87 \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP()  は成功すれば 0
88 を、エラーの場合は \-1 を返す。
89 .PP
90 \fBsigismember\fP()  は \fIsignum\fP が \fIset\fP のメンバの場合 1 を返し、メンバでない場合 0 を返す。 エラーの場合は
91 \-1 を返し、 \fIerrno\fP にエラーの原因を示す値を設定する。
92 .SH エラー
93 .TP 
94 \fBEINVAL\fP
95 \fIsig\fP が有効なシグナルではない。
96 .SH 属性
97 .SS "マルチスレッディング (pthreads(7) 参照)"
98 関数 \fBsigemptyset\fP(), \fBsigfillset\fP(), \fBsigaddset\fP(), \fBsigdelset\fP(),
99 \fBsigismember\fP(), \fBsigisemptyset\fP(), \fBsigorset\fP(), \fBsigandset\fP()
100 はスレッドセーフである。
101 .SH 準拠
102 POSIX.1\-2001.
103 .SH 注意
104 .SS "glibc での注意"
105 \fB_GNU_SOURCE\fP 機能検査マクロが定義されていると、 \fI<signal.h>\fP でシグナル集合を操作する 3
106 つの関数が追加で公開される。
107
108 .nf
109 \fBint sigisemptyset(const sigset_t *\fP\fIset\fP\fB);\fP
110 \fBint sigorset(sigset_t *\fP\fIdest\fP\fB, const sigset_t *\fP\fIleft\fP\fB,\fP
111 \fB              const sigset_t *\fP\fIright\fP\fB);\fP
112 \fBint sigandset(sigset_t *\fP\fIdest\fP\fB, const sigset_t *\fP\fIleft\fP\fB,\fP
113 \fB              const sigset_t *\fP\fIright\fP\fB);\fP
114 .fi
115
116 \fBsigisemptyset\fP() は \fIset\fP にシグナルが一つも含まれていなければ 1 を返し、 それ以外は 0 を返す。
117
118 \fBsigorset\fP() は集合 \fIleft\fP と \fIright\fP の和集合を \fIdest\fP に設定する。 \fBsigandset\fP() は集合
119 \fIleft\fP と \fIright\fP の積集合を \fIdest\fP に設定する。 どちらの関数も成功すると 0 を返し、失敗時には \-1 を返す。
120 .PP
121 これらの関数は非標準であり、(他にも同様の関数を提供しているシステムも いくつかはあるが) 移植性を考慮したアプリケーションでは使用を避けるべき
122 である。
123 .SH 関連項目
124 \fBsigaction\fP(2), \fBsigpending\fP(2), \fBsigprocmask\fP(2), \fBsigsuspend\fP(2)
125 .SH この文書について
126 この man ページは Linux \fIman\-pages\fP プロジェクトのリリース 3.67 の一部である。
127 プロジェクトの説明とバグ報告に関する情報は \%http://www.kernel.org/doc/man\-pages/ に書かれている。