File: signal.2

package info (click to toggle)
manpages-ja 0.5.0.0.20050315-1
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 18,620 kB
  • ctags: 4
  • sloc: sh: 12,675; perl: 157; makefile: 106
file content (328 lines) | stat: -rw-r--r-- 6,833 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
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
.\" Copyright (c) 2000 Andries Brouwer <aeb@cwi.nl>
.\" based on work by Rik Faith <faith@cs.unc.edu>
.\" and Mike Battersby <mike@starbug.apana.org.au>.
.\"
.\" 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.
.\"
.\" Modified 2004-11-19, mtk: 
.\" added pointer to sigaction.2 for details of ignoring SIGCHLD 
.\"
.\" Japanese Version Copyright (c) 1997 HANATAKA Shinya
.\"         all rights reserved.
.\" Translated Mon Mar  3 23:30:58 JST 1997
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Modified Mon Sep 24 Sun Sep 24 13:26:36 JST 2000
.\"         by HANATAKA Shinya <hanataka@abyss.rim.or.jp>
.\" Updated & Modified Mon Jan 14 06:45:45 JST 2002
.\"         by Yuichi SATO <ysato@h4.dion.ne.jp>
.\" Updated & Modified Sat Jan 17 01:24:42 JST 2004
.\"         by Yuichi SATO <ysato444@yahoo.co.jp>
.\" Updated & Modified Fri Jan  7 06:58:29 JST 2005 by Yuichi SATO
.\"
.\"WORD:	signal			ʥ
.\"WORD:	signal handler		ʥ롦ϥɥ顼
.\"WORD:	library			饤֥
.\"WORD:	semantics		
.\"WORD:	prototype		
.\"WORD:	architecture		ƥ㡼
.\"WORD:	endless loop		̵¥롼
.\"
.TH SIGNAL 2 2000-04-28 "Linux 2.2" "Linux Programmer's Manual"
.SH ̾
signal \- ANSI C ʥ
.SH 
.B #include <signal.h>
.sp
.B typedef void (*sighandler_t)(int);
.sp
.BI "sighandler_t signal(int " signum ", sighandler_t " sighandler );
.SH 
.B signal
ƥࡦ
.I signum
ǻꤵ줿ֹΥʥ
ʥ롦ϥɥ顼ꤹ롣
Υʥ롦ϥɥ顼
.I sighandler
ꤵ롣
.I sighandler
ϡ桼λꤷؿ
.BR SIG_IGN 
.B SIG_DFL 
Τ줫Ǥ롣

ʥֹ
.I signum
ΥʥȼΤ褦ư롣
бϥɥ顼
.B SIG_IGN
ꤵƤϡʥ̵뤵롣
ϥɥ顼
.B SIG_DFL
ꤵƤϡʥ˴ϢŤ줿
ǥեȤưԤ
.RB ( signal (7)
򻲾)
ϥɥ顼ؿ
.I sighandler
ꤵƤϡޤǽ˥ϥɥ顼 SIG_DFL ˥ꥻåȤ
(뤤ϼ˰¸륷ʥΥ֥å¹Ԥ)

.I signum
Ȥ
.I sighandler
ƤФ롣

ʥФƥʥϥɥ顼ؿȤȤϡ
֥ʥΥåפȸƤФ롣
ʥ
.B SIGKILL

.B SIGSTOP
ϥåǤ̵뤹뤳ȤǤʤ

.SH ֤
.B signal
ؿϺޤǤΥʥ롦ϥɥ顼֤ͤ顼ξ
.B SIG_ERR
֤

.SH ܿ
Unix Υꥸʥ
.BR signal ()
ϥϥɥ顼 SIG_DFL ˥ꥻåȤ롣
System V ( Linux ͥ libc4,5) ƱǤ롣
BSD Ǥϥϥɥ顼ΥꥻåȤԤ鷺
ϥɥ顼ƤФƤ֤
ʥο󥹥󥹤ȯΤ֥å롣
glibc2 饤֥Ǥ BSD ư˽äƤ롣

libc5 ƥˤ
.B "<signal.h>"
Τ
.B "<bsd/signal.h>"
򥤥󥯥롼ɤȡ
.B signal

.B __bsd_signal
˺ BSD Ȥʤ롣
Ͽ侩ʤ

glibc2 ƥˤ
.B _XOPEN_SOURCE
Τ褦ƥȥޥꡢδؿȤ̤
.B sysv_signal
ؿȤäꤹСΤ褦ư򤹤롣
Ͽ侩ʤ

ޥեΥ󥯥롼ɤ
δؿѹ褦ȤΤϡɤʤͤǤ롣
.B signal
ȤΤ򤱤ơ
.BR sigaction (2)
Ȥäɤ

.SH 
ޥåɥץˤ뤳δؿη̤ϡꤵƤʤ
.PP
¾ξǤνǤդβսdzޤ뤿ᡢ
.I handler
դʤФʤʤ
POSIX ˤϡְʴؿפȤǰ롣
ʥ뤬Ǥʤؿ˳ߡ

.I handler
ΰǤʤؿƤӽФƤ硢εư̤Ǥ롣
ʴؿ͡ʵʤΤ˥ꥹȤƤ롣
POSIX 1003.1-2003 ǤΥꥹȤϰʲ̤Ǥ:

_Exit()
_exit()
abort()
accept()
access()
aio_error()
aio_return()
aio_suspend()
alarm()
bind()
cfgetispeed()
cfgetospeed()
cfsetispeed()
cfsetospeed()
chdir()
chmod()
chown()
clock_gettime()
close()
connect()
creat()
dup()
dup2()
execle()
execve()
fchmod()
fchown()
fcntl()
fdatasync()
fork()
fpathconf()
fstat()
fsync()
ftruncate()
getegid()
geteuid()
getgid()
getgroups()
getpeername()
getpgrp()
getpid()
getppid()
getsockname()
getsockopt()
getuid()
kill()
link()
listen()
lseek()
lstat()
mkdir()
mkfifo()
open()
pathconf()
pause()
pipe()
poll()
posix_trace_event()
pselect()
raise()
read()
readlink()
recv()
recvfrom()
recvmsg()
rename()
rmdir()
select()
sem_post()
send()
sendmsg()
sendto()
setgid()
setpgid()
setsid()
setsockopt()
setuid()
shutdown()
sigaction()
sigaddset()
sigdelset()
sigemptyset()
sigfillset()
sigismember()
signal()
sigpause()
sigpending()
sigprocmask()
sigqueue()
sigset()
sigsuspend()
sleep()
socket()
socketpair()
stat()
symlink()
sysconf()
tcdrain()
tcflow()
tcflush()
tcgetattr()
cgetpgrp()
tcsendbreak()
tcsetattr()
tcsetpgrp()
time()
timer_getoverrun()
timer_gettime()
timer_settime()
times()
umask()
uname()
unlink()
utime()
wait()
waitpid()
write().
.PP
POSIX ˤȡ
.BR kill (2)

.BR raise (3)
ؿǤʤ
.BR SIGFPE ,
.BR SIGILL ,
.B SIGSEGV
ʥ̵뤷ư̤Ǥ롣
0 ˤ껻η̤̤Ȥʤ롣
Υƥ㡼Ǥϡ
.B SIGFPE
ʥ롣
(Ʊͤκ \-1 dz
.B SIGFPE
뤫⤷ʤ)
Υʥ̵뤹̵¥롼פ˴٤뤫⤷ʤ
.PP
.B SIGCHLD
ưȤ
.B SIG_IGN
ꤷξܺ٤ưˤĤƤϡ
.BR sigaction (2)
򻲾Ȥ뤳ȡ
.PP
.B sighandler_t
λѤ GNU ĥǤ롣
ƼС libc ǤηѤߤǤ; 
libc4  libc5 Ǥ
.IR SignalHandler
Ƥ롣
glibc Ǥ
.I sig_t
Ƥꡢ
.B _GNU_SOURCE
Ƥˤ
.IR sighandler_t
Ƥ롣
.SH 
ANSI C

.SH Ϣ
.BR kill (1),
.BR alarm (2),
.BR kill (2),
.BR pause (2),
.BR sigaction (2),
.BR sigqueue (2),
.BR sigvec (2),
.BR killpg (3),
.BR raise (3),
.BR sigsetops (3),
.BR signal (7)