File: signal.2

package info (click to toggle)
manpages-ja 0.4.0.0.20020315-2
  • links: PTS
  • area: main
  • in suites: woody
  • size: 14,808 kB
  • ctags: 4
  • sloc: sh: 9,595; perl: 157; makefile: 62
file content (192 lines) | stat: -rw-r--r-- 5,105 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
.\" 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.
.\"
.\" 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>
.\"
.\"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
ǻꤵ줿ֹΥʥ
ʥ롦ϥɥ顼 (signal hanlder) ꤹ롣
Υʥ롦ϥɥ顼
.I sighandler
ꤵ롣
.I sighandler
ϡ桼λꤷؿ
.BR SIG_IGN 
.B SIG_DFL 
Τ줫Ǥ롣

ʥֹ
.I signum
ΥʥȼΤ褦ư롣
бϥɥ顼
.B SIG_IGN
ꤵƤϡʥ̵ (ignore) 롣
ϥɥ顼
.B SIG_DFL
ꤵƤϡʥ˴ϢŤ줿
ǥե (default) ưԤ
.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  (semantics) Ȥʤ롣
Ͽ侩ʤ

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

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

.SH 
POSIX ˤȡ
.BR kill (2)

.BR raise (3)
ؿǤʤ
.BR SIGFPE ,
.BR SIGILL ,
.B SIGSEGV
ʥ̵ (ignore) ư̤Ǥ롣
0 ˤ껻η̤̤Ȥʤ롣
Υƥ㡼Ǥϡ
.B SIGFPE
ʥ롣
(Ʊͤκ \-1 dz
.B SIGFPE
뤫⤷ʤ)
Υʥ̵뤹̵¥롼פ˴٤뤫⤷ʤ
.PP
POSIX (3.3.1.3) ˤ 
.B SIGCHLD
ưȤ
.B SIG_IGN
ꤷư̤Ǥ롣
ξư BSD  SYSV ǤϰۤäƤꡢ
.B SIGCHLD ư 
.B SIG_IGN
ꤷƤ BSD Υեȥ Linux ǤϼԤ롣
.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 kill (2),
.BR killpg (2),
.BR pause (2),
.BR raise (3),
.BR sigaction (2),
.BR signal (7),
.BR sigsetops (3),
.BR sigvec (2),
.BR alarm (2)