File: sigvec.3

package info (click to toggle)
manpages-ja 0.5.0.0.20100315-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 21,156 kB
  • ctags: 1
  • sloc: sh: 13,935; perl: 157; makefile: 114
file content (256 lines) | stat: -rw-r--r-- 6,261 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
'\" t
.\" Copyright (c) 2005 by Michael Kerrisk <mtk.manpages@gmail.com>
.\"
.\" 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) 2005 Akihiro MOTOKI all rights reserved.
.\" Translated 2005-12-04, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\"
.TH SIGVEC 3 2007-07-26 "Linux" "Linux Programmer's Manual"
.SH ̾
sigvec, sigblock, sigsetmask, siggetmask, sigmask \- BSD ǥʥ API
.SH 
.B #include <signal.h>
.sp
.BI "int sigvec(int " sig ", struct sigvec *" vec ", struct sigvec *" ovec );
.sp
.BI "int sigmask(int " signum );
.sp
.BI "int sigblock(int " mask );
.sp
.BI "int sigsetmask(int " mask );
.sp
.B int siggetmask(void);
.sp
.in -4n
glibc εǽޥ׷
.RB ( feature_test_macros (7)
):
.in
.sp
嵭Ƥδؿ:
_BSD_SOURCE
.SH 
δؿϡΤʤ BSD ǥʥ API ѤƤץ
ФƸߴΤ륤󥿥ե glibc 󶡤ΤǤ롣
 API ϲΤΤǤꡢץꥱǤ
POSIX ʥ API
.RB ( sigaction (2),
.BR sigprocmask (2)
ʤ) Ѥ٤Ǥ롣

ؿ
.BR sigvec ()
ϡ(POSIX 
.BR sigaction (2)
Ʊͤ) ʥ
.I sig
ưꡦԤ
.I vec
ϡNULL ʳξ硢
.I sig
οư
.I sigvec
¤ΤؤΥݥ󥿤Ǥ롣
.I ovec
ϡNULL ʳξ硢
.I sig
ѹư֤˻Ѥ
.I sigvec
¤ΤؤΥݥ󥿤Ǥ롣
.I sig
ưѹ˸ߤư뤿ˤϡ
.I vec
 NULL ꤷ
.I ovec
 NULL Ǥʤݥ󥿤ꤹФ褤

.B SIGKILL

.B SIGSTOP
ưѹǤʤ

.I sigvec
¤Τϰʲ̤Ǥ:
.in +4n
.nf

struct sigvec {
    void (*sv_handler)();  /* Signal disposition */
    int    sv_mask;        /* Signals to be blocked in handler */
    int    sv_flags;       /* Flags */
};

.fi
.in
.I sv_handler
եɤϥʥưꤹΤǡ
ʥϥɥؿΥɥ쥹
.B SIG_DFL

.B SIG_IGN
Τ줫Ǥ롣
.B SIG_DFL
ϥʥŬѤǥեȤự
.B SIG_IGN
ϥʥ̵뤹뤳Ȥ̣롣

.I sv_handler
˥ʥϥɥΥɥ쥹ꤷ硢
.I sv_mask
ϥϥɥ餬¹˥֥å٤ʥΥޥꤹ롣
ޤϥɥưʥ뼫ȤϥǥեȤǥ֥å롣
.B SIGKILL

.B SIGSTOP
֥å褦Ȥˤϡۤä̵뤵롣

.I sv_handler
˥ʥϥɥΥɥ쥹ꤷ硢
.I sv_flags
եɤϥϥɥ餬ƤФ줿ݤεư椹ե饰ꤹ롣
Υեɤˤϡ0 ʲΥե饰 1İʾǤ:
.TP
.B SV_INTERRUPT
ʥϥɥ餬ΥƥॳǤ硢
ϥɥ餫Ƥ⡢ƥॳϺƳ줺
.B EINTR
ǼԤ롣
Υե饰ꤷʤä硢ƥॳ
ǥեȤǺƳ롣
.TP
.B SV_RESETHAND
ʥϥɥƤӽФ˥ʥư
ǥեȤ˥ꥻåȤ롣
Υե饰ꤷʤä硢⤦
.BR sigvec ()
ƤӽФŪ˺뤫ץ
.BR execve (2)
¹Ԥޤǡϥɥꤵ줿ޤޤȤʤ롣
.TP
.B SV_ONSTACK
إʥ륹åǥʥϥɥ¹Ԥ
(ŪˡBSD Ǥإʥ륹åѻߤ줿ؿ
.BR sigstack ()
Ȥäꤹ롣POSIX Ǥϡ
.BR sigaltstack (2)
Ѥ)
.PP
ؿ
.BR sigmask ()

.I signum
Ф֥ʥޥפ֤
㤨СʲΤ褦ʥɤȤȡ
.BR sigvec ()
Ϥ
.I vec.sv_mask
Ǥ롣
.nf

    vec.sv_mask = sigmask(SIGQUIT) | sigpause(SIGABRT);
                /* Block SIGQUIT and SIGABRT during
                   handler execution */
.fi
.PP
.BR sigblock ()
ؿϡ
.I mask
ˤ륷ʥץΥʥޥɲä
(POSIX 
.I sigprocmask(SIG_BLOCK)
Ʊ)ѹΥץΥʥޥ֤
.B SIGKILL

.B SIGSTOP
֥å褦Ȥˤϡۤä̵뤵롣
.PP
.BR sigsetmask ()
ؿϥץΥʥޥ
.I mask
ǻꤵ줿ͤꤷ (POSIX 
.I sigprocmask(SIG_SETMASK)
Ʊ)ѹΥץΥʥޥ֤
.PP
.BR siggetmask ()
ؿϥץθߤΥʥޥ֤δؿ
.I sigblock(0)
Ǥ롣
.SH ֤
.BR sigvec ()
ؿ 0 ֤顼ξ硢\-1 ֤
.I errno
˥顼򼨤ͤ򥻥åȤ롣

.BR sigblock ()

.BR sigsetmask ()
ѹΥʥޥ֤

.BR sigmask ()
ؿ
.I signum
Υʥޥ֤
.SH 顼
.BR sigaction (2)

.BR sigprocmask (2)
Ρ֥顼פ򻲾ȡ
.SH 
δؿΤ
.BR siggetmask ()
ʳƤ 4.3BSD ˤä
.BR siggetmask ()
νмϤϤäꤷʤ
δؿѻͽǤꡢץǤϻѤʤȡ
.SH 
4.3BSD ǤϡΤ륷ʥ󶡤
.RI ( vec.sv_mask
 0 
.BR sigvec ()
ƤӽФȤƱ)
System V 󶡤ϿΤʤΤǤ롣
POSIX.1-2001 Ǥϡ
.BR signal ()
ΤϵꤷʤޤޤȤʤäƤ롣
ʤܺ٤ˤĤƤ
.BR signal (2)
򻲾ȡ

BSD  System V ΤɤΥƥǤ
ʥԤĤˡ
.BR sigpause (3)
Ȥ̾δؿ󶡤Ƥ뤬
δؿΰξΥƥǰۤʤ롣
ܺ٤
.BR sigpause (3)
򻲾ȡ
.SH Ϣ
.BR kill (2),
.BR pause (2),
.BR sigaction (2),
.BR signal (2),
.BR sigprocmask (2),
.BR raise (3),
.BR sigpause (3),
.BR sigset (3),
.BR signal (7)