2 .\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
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.
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.
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
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
24 .\" Japanese Version Copyright (c) 2005 Akihiro MOTOKI all rights reserved.
25 .\" Translated 2005-12-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
27 .TH SIGVEC 3 2007-07-26 "Linux" "Linux Programmer's Manual"
29 sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD ÈÇ¥·¥°¥Ê¥ë API
31 .B #include <signal.h>
33 .BI "int sigvec(int " sig ", struct sigvec *" vec ", struct sigvec *" ovec );
35 .BI "int sigmask(int " signum );
37 .BI "int sigblock(int " mask );
39 .BI "int sigsetmask(int " mask );
41 .B int siggetmask(void);
44 glibc ¸þ¤±¤Îµ¡Ç½¸¡ºº¥Þ¥¯¥í¤ÎÍ×·ï
45 .RB ( feature_test_macros (7)
52 ¤³¤ì¤é¤Î´Ø¿ô¤Ï¡¢ÀΤʤ¬¤é¤Î BSD ÈÇ¥·¥°¥Ê¥ë API ¤ò»ÈÍѤ·¤Æ¤¤¤ë¥×¥í¥°¥é¥à
53 ¤ËÂФ·¤Æ¸ß´¹À¤Î¤¢¤ë¥¤¥ó¥¿¥Õ¥§¡¼¥¹¤ò glibc ¤ÇÄ󶡤¹¤ë¤â¤Î¤Ç¤¢¤ë¡£
54 ¤³¤Î API ¤Ï²áµî¤Î¤â¤Î¤Ç¤¢¤ê¡¢¿·¤·¤¤¥¢¥×¥ê¥±¡¼¥·¥ç¥ó¤Ç¤Ï
58 ¤Ê¤É) ¤ò»ÈÍѤ¹¤Ù¤¤Ç¤¢¤ë¡£
66 ¤ÎÆ°ºî¤ÎÀßÄꡦ¼èÆÀ¤ò¹Ô¤¦¡£
70 ¤Î¿·¤·¤¤Æ°ºî¤òÄêµÁ¤·¤¿
72 ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¢¤ë¡£
76 ¤ÎÊѹ¹Á°¤ÎÆ°ºî¤òÊÖ¤¹¤¿¤á¤Ë»ÈÍѤµ¤ì¤ë
78 ¹½Â¤ÂΤؤΥݥ¤¥ó¥¿¤Ç¤¢¤ë¡£
80 ¤ÎÆ°ºî¤òÊѹ¹¤»¤º¤Ë¸½ºß¤ÎÆ°ºî¤ò¼èÆÀ¤¹¤ë¤¿¤á¤Ë¤Ï¡¢
84 ¤Ë NULL ¤Ç¤Ê¤¤¥Ý¥¤¥ó¥¿¤ò»ØÄꤹ¤ì¤Ð¤è¤¤¡£
89 ¤ÎÆ°ºî¤ÏÊѹ¹¤Ç¤¤Ê¤¤¡£
92 ¹½Â¤ÂΤϰʲ¼¤ÎÄ̤ê¤Ç¤¢¤ë:
97 void (*sv_handler)(); /* Signal disposition */
98 int sv_mask; /* Signals to be blocked in handler */
99 int sv_flags; /* Flags */
105 ¥Õ¥£¡¼¥ë¥É¤Ï¥·¥°¥Ê¥ë¤ÎÆ°ºî¤ò»ØÄꤹ¤ë¤â¤Î¤Ç¡¢
106 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é´Ø¿ô¤Î¥¢¥É¥ì¥¹¤«¡¢
110 ¤Î¤¤¤º¤ì¤«¤ò»ØÄê¤Ç¤¤ë¡£
112 ¤Ï¥·¥°¥Ê¥ë¤ËŬÍѤµ¤ì¤ë¥Ç¥Õ¥©¥ë¥È¤ÎÆ°ºî¤ò°ÕÌ£¤·¡¢
114 ¤Ï¥·¥°¥Ê¥ë¤ò̵»ë¤¹¤ë¤³¤È¤ò°ÕÌ£¤¹¤ë¡£
117 ¤Ë¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¥¢¥É¥ì¥¹¤ò»ØÄꤷ¤¿¾ì¹ç¡¢
119 ¤Ï¥Ï¥ó¥É¥é¤¬¼Â¹ÔÃæ¤Ë¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¤Ù¤¥·¥°¥Ê¥ë¤Î¥Þ¥¹¥¯¤ò»ØÄꤹ¤ë¡£
120 ¤Þ¤¿¡¢¥Ï¥ó¥É¥é¤òµ¯Æ°¤·¤¿¥·¥°¥Ê¥ë¼«¿È¤Ï¥Ç¥Õ¥©¥ë¥È¤Ç¥Ö¥í¥Ã¥¯¤µ¤ì¤ë¡£
124 ¤ò¥Ö¥í¥Ã¥¯¤·¤è¤¦¤È¤·¤¿¾ì¹ç¤Ë¤Ï¡¢ÌۤäÆ̵»ë¤µ¤ì¤ë¡£
127 ¤Ë¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤Î¥¢¥É¥ì¥¹¤ò»ØÄꤷ¤¿¾ì¹ç¡¢
129 ¥Õ¥£¡¼¥ë¥É¤Ï¥Ï¥ó¥É¥é¤¬¸Æ¤Ð¤ì¤¿ºÝ¤ÎµóÆ°¤òÀ©¸æ¤¹¤ë¥Õ¥é¥°¤ò»ØÄꤹ¤ë¡£
130 ¤³¤Î¥Õ¥£¡¼¥ë¥É¤Ë¤Ï¡¢0 ¤«¡¢°Ê²¼¤Î¥Õ¥é¥°¤ò 1¸Ä°Ê¾å»ØÄê¤Ç¤¤ë:
133 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤¬Ää»ßÃæ¤Î¥·¥¹¥Æ¥à¥³¡¼¥ë¤òÃæÃǤ·¤¿¾ì¹ç¡¢
134 ¥Ï¥ó¥É¥é¤«¤éÉüµ¢¤·¤Æ¤â¡¢¥·¥¹¥Æ¥à¥³¡¼¥ë¤ÏºÆ³«¤µ¤ì¤º¡¢
138 ¤³¤Î¥Õ¥é¥°¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¡¢¥·¥¹¥Æ¥à¥³¡¼¥ë¤Ï
139 ¥Ç¥Õ¥©¥ë¥È¤ÇºÆ³«¤µ¤ì¤ë¡£
142 ¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ò¸Æ¤Ó½Ð¤¹Á°¤Ë¥·¥°¥Ê¥ë¤ÎÆ°ºî¤ò
143 ¥Ç¥Õ¥©¥ë¥È¤Ë¥ê¥»¥Ã¥È¤¹¤ë¡£
144 ¤³¤Î¥Õ¥é¥°¤ò»ØÄꤷ¤Ê¤«¤Ã¤¿¾ì¹ç¡¢¤â¤¦°ìÅÙ
146 ¤ò¸Æ¤Ó½Ð¤·¤ÆÌÀ¼¨Åª¤Ëºï½ü¤µ¤ì¤ë¤«¡¢¥×¥í¥»¥¹¤¬
148 ¤ò¼Â¹Ô¤¹¤ë¤Þ¤Ç¡¢¥Ï¥ó¥É¥é¤ÏÀßÄꤵ¤ì¤¿¤Þ¤Þ¤È¤Ê¤ë¡£
151 ÂåÂØ¥·¥°¥Ê¥ë¥¹¥¿¥Ã¥¯¾å¤Ç¥·¥°¥Ê¥ë¥Ï¥ó¥É¥é¤ò¼Â¹Ô¤¹¤ë
152 (Îò»ËŪ¤Ë¡¢BSD ¤Ç¤ÏÂåÂØ¥·¥°¥Ê¥ë¥¹¥¿¥Ã¥¯¤ÏÇѻߤµ¤ì¤¿´Ø¿ô
154 ¤ò»È¤Ã¤ÆÀßÄꤹ¤ë¡£POSIX ¤Ç¤Ï¡¢Âå¤ï¤ê¤Ë
162 ¤ËÂФ¹¤ë¡Ö¥·¥°¥Ê¥ë¥Þ¥¹¥¯¡×¤ò¹½À®¤·¤ÆÊÖ¤¹¡£
163 Î㤨¤Ð¡¢°Ê²¼¤Î¤è¤¦¤Ê¥³¡¼¥É¤ò»È¤¦¤È¡¢
170 vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);
171 /* Block SIGQUIT and SIGABRT during
178 ¤Ë¤¢¤ë¥·¥°¥Ê¥ë¤ò¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ËÄɲä·
180 .I sigprocmask(SIG_BLOCK)
181 ¤ÈƱÍÍ)¡¢Êѹ¹Á°¤Î¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊÖ¤¹¡£
185 ¤ò¥Ö¥í¥Ã¥¯¤·¤è¤¦¤È¤·¤¿¾ì¹ç¤Ë¤Ï¡¢ÌۤäÆ̵»ë¤µ¤ì¤ë¡£
188 ´Ø¿ô¤Ï¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤ò
190 ¤Ç»ØÄꤵ¤ì¤¿ÃͤËÀßÄꤷ (POSIX ¤Î
191 .I sigprocmask(SIG_SETMASK)
192 ¤ÈƱÍÍ)¡¢Êѹ¹Á°¤Î¥×¥í¥»¥¹¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊÖ¤¹¡£
195 ´Ø¿ô¤Ï¥×¥í¥»¥¹¤Î¸½ºß¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊÖ¤¹¡£¤³¤Î´Ø¿ô¤Ï
200 ´Ø¿ô¤ÏÀ®¸ù¤¹¤ë¤È 0 ¤òÊÖ¤¹¡£¥¨¥é¡¼¤Î¾ì¹ç¡¢\-1 ¤òÊÖ¤·¡¢
202 ¤Ë¥¨¥é¡¼¤ò¼¨¤¹Ãͤò¥»¥Ã¥È¤¹¤ë¡£
207 ¤ÏÊѹ¹Á°¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊÖ¤¹¡£
212 ¤Î¥·¥°¥Ê¥ë¥Þ¥¹¥¯¤òÊÖ¤¹¡£
217 ¤Î¡Ö¥¨¥é¡¼¡×¤ÎÀá¤ò»²¾È¡£
221 °Ê³°¤ÎÁ´¤Æ¤Ï 4.3BSD ¤Ë¤¢¤Ã¤¿¡£
223 ¤Î½Ð¼«¤Ï¤Ï¤Ã¤¤ê¤·¤Ê¤¤¡£
224 ¤³¤ì¤é¤Î´Ø¿ô¤ÏÇÑ»ßͽÄê¤Ç¤¢¤ê¡¢¿·¤·¤¤¥×¥í¥°¥é¥à¤Ç¤Ï»ÈÍѤ·¤Ê¤¤¤³¤È¡£
226 4.3BSD ¤Ç¤Ï¡¢¿®ÍêÀ¤Î¤¢¤ë¥·¥°¥Ê¥ë½èÍýµ¡¹½¤òÄ󶡤¹¤ë
230 ¤ò¸Æ¤Ó½Ð¤·¤¿¤È¤¤ÈƱÍÍ)¡£
231 System V ¤¬Ä󶡤¹¤ë½èÍýµ¡¹½¤Ï¿®ÍêÀ¤Î¤Ê¤¤¤â¤Î¤Ç¤¢¤ë¡£
234 ¤Î¤³¤ÎÅÀ¤Ïµ¬Äꤷ¤Ê¤¤¤Þ¤Þ¤È¤Ê¤Ã¤Æ¤¤¤ë¡£
235 ¤µ¤é¤Ê¤ë¾ÜºÙ¤Ë¤Ä¤¤¤Æ¤Ï
239 BSD ¤È System V ¤Î¤É¤Á¤é¤Î¥·¥¹¥Æ¥à¤Ç¤â
240 ¥·¥°¥Ê¥ë¤òÂԤĤ¿¤á¤Ë¡¢
242 ¤È¤¤¤¦Ì¾Á°¤Î´Ø¿ô¤¬Ä󶡤µ¤ì¤Æ¤¤¤ë¤¬¡¢
243 ¤³¤Î´Ø¿ô¤Î°ú¤¿ô¤ÏξÊý¤Î¥·¥¹¥Æ¥à¤Ç°Û¤Ê¤ë¡£