OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / draft / man2 / sigprocmask.2
1 .\" Copyright (c) 2005 Michael Kerrisk
2 .\" based on earlier work by faith@cs.unc.edu and
3 .\" Mike Battersby <mib@deakin.edu.au>
4 .\"
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
8 .\"
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
13 .\"
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein.  The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
26 .\"
27 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
28 .\" Translated 2005-10-03, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
29 .\"
30 .TH SIGPROCMASK 2 2008-10-17 "Linux" "Linux Programmer's Manual"
31 .\"O .SH NAME
32 .SH Ì¾Á°
33 .\"O sigprocmask \- examine and change blocked signals
34 sigprocmask \- ¶Ø»ß¤¹¤ë¥·¥°¥Ê¥ë¤Î³Îǧ¤ÈÊѹ¹
35 .\"O .SH SYNOPSIS
36 .SH ½ñ¼°
37 .B #include <signal.h>
38 .sp
39 .BI "int sigprocmask(int " how ", const sigset_t *" set ,
40 .BI "sigset_t *" oldset );
41 .sp
42 .in -4n
43 .\"O Feature Test Macro Requirements for glibc (see
44 .\"O .BR feature_test_macros (7)):
45 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
46 .RB ( feature_test_macros (7)
47 »²¾È):
48 .in
49 .sp
50 .ad l
51 .BR sigprocmask ():
52 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
53 .ad b
54 .\"O .SH DESCRIPTION
55 .SH ÀâÌÀ
56 .\"O .BR sigprocmask ()
57 .\"O is used to fetch and/or change the signal mask of the calling thread.
58 .\"O The signal mask is the set of signals whose delivery is currently
59 .\"O blocked for the caller
60 .\"O (see also
61 .\"O .BR signal (7)
62 .\"O for more details).
63 .BR sigprocmask ()
64 ¤ò»È¤¦¤È¡¢¸Æ¤Ó½Ð¤·¤¿¥¹¥ì¥Ã¥É¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Î¼èÆÀ/Êѹ¹¤¬¤Ç¤­¤ë¡£
65 ¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Ï¡¢¸Æ¤Ó½Ð¤·¸µ¤ËÂФ·¤Æ¸½ºßÇÛÁ÷¤¬¶Ø»ß¤µ¤ì¤Æ¤¤¤ë¥·¥°¥Ê¥ë¤Î
66 ½¸¹ç¤Î¤³¤È¤Ç¤¢¤ë (¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
67 .BR signal (7)
68 ¤â»²¾È¤Î¤³¤È)¡£
69
70 .\"O The behavior of the call is dependent on the value of
71 .\"O .IR how ,
72 .\"O as follows.
73 ¤³¤Î¥³¡¼¥ë¤ÎÆ°ºî¤Ï
74 .I how
75 ¤ÎÃͤˤè¤Ã¤Æ·è¤Þ¤ë:
76 .TP
77 .B SIG_BLOCK
78 .\"O The set of blocked signals is the union of the current set and the
79 .\"O .I set
80 .\"O argument.
81 ¶Ø»ß¤µ¤ì¤¿¥·¥°¥Ê¥ë¤Î½¸¹ç¤Ï¸½ºß¤ÎÃͤÈ
82 .I set
83 °ú¤­¿ô¤ò·ë¹ç¤·¤¿¤â¤Î¤È¤Ê¤ë¡£
84 .TP
85 .B SIG_UNBLOCK
86 .\"O The signals in
87 .\"O .I set
88 .\"O are removed from the current set of blocked signals.
89 .\"O It is permissible to attempt to unblock a signal which is not blocked.
90 ¸½ºß¶Ø»ß¤µ¤ì¤Æ¤¤¤ë¥·¥°¥Ê¥ë¤Î½¸¹ç¤«¤é
91 .I set
92 ¤Ë¤¢¤ë¥·¥°¥Ê¥ë¤ò¼è¤ê½ü¤¯¡£¶Ø»ß¤µ¤ì¤Æ¤¤¤Ê¤¤¥·¥°¥Ê¥ë¤ò¼è¤ê½ü¤³¤¦¤È
93 ¤¹¤ë¤³¤È¤âǧ¤á¤é¤ì¤Æ¤¤¤ë¡£
94 .TP
95 .B SIG_SETMASK
96 .\"O The set of blocked signals is set to the argument
97 .\"O .IR set .
98 ¶Ø»ß¤µ¤ì¤Æ¤¤¤ë¥·¥°¥Ê¥ë¤Î½¸¹ç¤Ë
99 .I set
100 °ú¤­¿ô¤òÀßÄꤹ¤ë¡£
101 .PP
102 .\"O If
103 .\"O .I oldset
104 .\"O is non-NULL, the previous value of the signal mask is stored in
105 .\"O .IR oldset .
106 .I oldset
107 ¤¬ NULL ¤Ç¤Ê¤±¤ì¤Ð¡¢¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Îº£¤Þ¤Ç¤ÎÃͤò
108 .I oldset
109 ¤Ë³ÊǼ¤¹¤ë¡£
110
111 .\"O If
112 .\"O .I set
113 .\"O is NULL, then the signal mask is unchanged (i.e.,
114 .\"O .I how
115 .\"O is ignored),
116 .\"O but the current value of the signal mask is nevertheless returned in
117 .\"O .I oldset
118 .\"O (if it is not NULL).
119 .I set
120 ¤¬ NULL ¤Ç¤¢¤ì¤Ð¡¢¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ÏÊѹ¹¤µ¤ì¤Ê¤¤ (¤¹¤Ê¤ï¤Á¡¢
121 .I how
122 ¤Ï̵»ë¤µ¤ì¤ë)¡£
123 .I set
124 ¤ÎÃͤˤ«¤«¤ï¤é¤º¡¢¸½ºß¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ÎÃͤÏ
125 .I oldset
126 ¤ËÆþ¤ì¤ÆÊÖ¤µ¤ì¤ë (⤷¡¢
127 .I oldset
128 ¤¬ NULL ¤Ç¤Ê¤¤¾ì¹ç)¡£
129
130 .\"O The use of
131 .\"O .BR sigprocmask ()
132 .\"O is unspecified in a multithreaded process; see
133 .\"O .BR pthread_sigmask (3).
134 ¥Þ¥ë¥Á¥¹¥ì¥Ã¥É¤Î¥×¥í¥»¥¹¤Ç
135 .BR sigprocmask ()
136 ¤ò»ÈÍѤ·¤¿¾ì¹ç¤ÎÆ°ºî¤Ïµ¬Äꤵ¤ì¤Æ¤¤¤Ê¤¤¡£
137 .BR pthread_sigmask (3)
138 ¤ò»²¾È¤Î¤³¤È¡£
139 .\"O .SH "RETURN VALUE"
140 .SH ÊÖ¤êÃÍ
141 .\"O .BR sigprocmask ()
142 .\"O returns 0 on success and \-1 on error.
143 .BR sigprocmask ()
144 ¤ÏÀ®¸ù¤¹¤ì¤Ð 0 ¤òÊÖ¤·¡¢¥¨¥é¡¼¤Ê¤é¤Ð \-1 ¤òÊÖ¤¹¡£
145 .\"O .SH ERRORS
146 .SH ¥¨¥é¡¼
147 .B EINVAL
148 .\"O The value specified in
149 .\"O .I how
150 .\"O was invalid.
151 .I how
152 ¤Ë»ØÄꤵ¤ì¤¿Ãͤ¬Í­¸ú¤Ç¤Ï¤Ê¤¤¡£
153 .\"O .SH "CONFORMING TO"
154 .SH ½àµò
155 POSIX.1-2001.
156 .\"O .SH NOTES
157 .SH Ãí°Õ
158 .\"O It is not possible to block
159 .\"O .BR SIGKILL " or " SIGSTOP .
160 .\"O Attempts to do so are silently ignored.
161 .B SIGKILL
162 ¤ä
163 .B SIGSTOP
164 ¤ò¶Ø»ß¤¹¤ë¤³¤È¤Ï¤Ç¤­¤Ê¤¤¡£
165 ¶Ø»ß¤·¤è¤¦¤È¤·¤Æ¤âÌۤäÆ̵»ë¤µ¤ì¤ë¡£
166
167 .\"O Each of the threads in a process has its own signal mask.
168 ¥×¥í¥»¥¹Æâ¤Î³Æ¥¹¥ì¥Ã¥É¤Ï¤½¤ì¤¾¤ìÀìÍѤΥ·¥°¥Ê¥ë¥Þ¥¹¥¯¤ò»ý¤Ä¡£
169
170 .\"O A child created via
171 .\"O .BR fork (2)
172 .\"O inherits a copy of its parent's signal mask;
173 .\"O the signal mask is preserved across
174 .\"O .BR execve (2).
175 .BR fork (2)
176 ·Ðͳ¤ÇºîÀ®¤µ¤ì¤¿»Ò¥×¥í¥»¥¹¤Ï¿Æ¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤Î¥³¥Ô¡¼¤ò·Ñ¾µ¤¹¤ë¡£
177 .BR execve (2)
178 ¤ÎÁ°¸å¤Ç¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ÏÊÝ»ý¤µ¤ì¤ë¡£
179
180 .\"O If
181 .\"O .BR SIGBUS ,
182 .\"O .BR SIGFPE ,
183 .\"O .BR SIGILL ,
184 .\"O or
185 .\"O .B SIGSEGV
186 .\"O are generated
187 .\"O while they are blocked, the result is undefined,
188 .\"O unless the signal was generated by the
189 .\"O .BR kill (2),
190 .\"O .BR sigqueue (2),
191 .\"O or
192 .\"O .BR raise (3).
193 ¥·¥°¥Ê¥ë
194 .BR SIGBUS ,
195 .BR SIGFPE ,
196 .BR SIGILL ,
197 .B SIGSEGV
198 ¤¬¶Ø»ß¤µ¤ì¤Æ¤¤¤ë´Ö¤ËÀ¸À®¤µ¤ì¤¿¾ì¹ç¤Ç¡¢
199 ¤½¤Î¥·¥°¥Ê¥ë¤¬
200 .BR kill (2),
201 .BR sigqueue (2),
202 .BR raise (3)
203 ¤Ë¤è¤Ã¤ÆÀ¸À®¤µ¤ì¤¿¤â¤Î¤Ç¤Ê¤¤¤È¤­¤Ë¤Ï¡¢
204 ¤½¤Î¸å¤ÎÆ°ºî¤Ï̤ÄêµÁ¤Ç¤¢¤ë¡£
205 .PP
206 .\"O See
207 .\"O .BR sigsetops (3)
208 .\"O for details on manipulating signal sets.
209 ¥·¥°¥Ê¥ë½¸¹ç¤ÎÁàºî¤Ë´Ø¤¹¤ë¾ÜºÙ¤Ï
210 .BR sigsetops (3)
211 ¤ò»²¾È¤Î¤³¤È¡£
212 .\"O .SH "SEE ALSO"
213 .SH ´ØÏ¢¹àÌÜ
214 .BR kill (2),
215 .BR pause (2),
216 .BR sigaction (2),
217 .BR signal (2),
218 .BR sigpending (2),
219 .BR sigqueue (2),
220 .BR sigsuspend (2),
221 .BR pthread_sigmask (3),
222 .BR sigsetops (3),
223 .BR signal (7)