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 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532
|
'\" t
.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\" and Copyright (c) 2002,2006 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.
.\"
.\" Modified Sat Jul 24 17:34:08 1993 by Rik Faith (faith@cs.unc.edu)
.\" Modified Sun Jan 7 01:41:27 1996 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Sun Apr 14 12:02:29 1996 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Sat Nov 13 16:28:23 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified 10 Apr 2002, by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Modified 7 Jun 2002, by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Added information on real-time signals
.\" Modified 13 Jun 2002, by Michael Kerrisk <mtk.manpages@gmail.com>
.\" Noted that SIGSTKFLT is in fact unused
.\" 2004-12-03, Modified mtk, added notes on RLIMIT_SIGPENDING
.\" 2006-04-24, mtk, Added text on changing signal dispositions,
.\" signal mask, and pending signals.
.\"
.\" Japanese Version Copyright (c) 1997 Takafumi Naka
.\" all rights reserved.
.\" Translated 1997-02-13, Takafumi Naka <takafumi@yk.rim.or.jp>
.\" Modified 1999-06-22, Tatsuo SEKINE <tsekine@isoternet.org>
.\" Modified 1999-07-18, Takafumi Naka <takafumi@yk.rim.or.jp>
.\" Modified 1999-12-06, NAKANO Takeo <nakano@apm.seikei.ac.jp>
.\" to catch up with v1.28 of the upstream.
.\" Updated 2003-07-24, Kentaro Shirakata <argrath@ub32.org>
.\" Updated 2005-02-23, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>
.\" Updated 2006-07-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.36
.\" Updated 2007-05-28, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.50
.\" Updated 2007-09-08, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v2.64
.\"
.\" WORD: disposition ˡ
.\"
.TH SIGNAL 7 2007-12-21 "Linux" "Linux Programmer's Manual"
.SH ̾
signal \- Ѳǽʥʥΰ
.SH
Linux POSIX ꥷʥ (reliable signal; ʸ "ɸॷʥ"ɽ)
POSIX ꥢ륿ॷʥξбƤ롣
.SS ʥˡ
ʥϤ줾츽ߤΡֽˡ (disposition)פݻƤꡢ
νˡˤꥷʥ뤬줿ݤ˥ץ
ɤΤ褦ʿ뤫ޤ롣
Ҥɽ "ư" ΥȥϳƥʥΥǥեȤ
ˡƤꡢʲΤ褦ʰ̣ġ
.IP Term
ǥեȤưϥץλ
.IP Ign
ǥեȤưϤΥʥ̵롣
.IP Core
ǥեȤưϥץλȥ
.RB ( core (5)
)
.IP Stop
ǥեȤưϥץΰߡ
.IP Cont
ǥեȤưϡץξˤμ¹ԤκƳ
.PP
ץϡ
.BR sigaction (2)
.BR signal (2)
Ȥäơʥνˡѹ뤳ȤǤ
.RB ( signal (2)
ܿ㤤)ʥ˵ưȤ
ץǤΤϡΤ줫ĤǤ롣
ǥեȤư¹Ԥ롢ʥ̵뤹롢
.I "ʥ ϥɥ (signal handler)"
ǥʥª롣ʥϥɥȤϡʥ
ưŪ˵ưץδؿǤ롣
ʥνˡϥץñ̤°Ǥ롣
ޥåɤΥץꥱǤϡ륷ʥνˡ
ƤΥåɤƱǤ롣
.SS ʥޥȽԤʥ
ʥ
.I "֥å (block)"
뤳Ȥ롣֥åȡΥʥ
θ֥åޤʤʤ롣
ʥ뤬ƤޤǤδ֡Υʥ
.I "Ԥ (pending)"
ǤȸƤФ롣
ץγƥåɤϡ줾Ω
.I "ʥޥ (signal mask)"
ġʥޥϤΥåɤߥ֥åƤ
ʥ뽸ΤǤ롣
åɤϡ
.BR pthread_sigmask (3)
ȤäƼʬΥʥޥǤ롣
Ūʥ륹åɤΥץꥱǤϡ
.BR sigprocmask (2)
ȤäơʥޥǤ롣
륷ʥ (äƽԤȤʤ륷ʥ) ˤϡ
ץΰƤΥåɰƤ롣
㤨СץΰƤΥʥ
.BR kill (2)
Ȥä롣
Υޥ̿μ¹Ԥη̤Ȥ롢
.B SIGSEGV
.B SIGFPE
ʤɤΥʥϡåɰƤȤʤ롣
ޤ
.BR pthread_kill (3)
ȤäΥåɰƤ줿ʥ
åɰƤȤʤ롣
ץƤΥʥϡΥʥ֥åƤʤåɤΤ
줫ΰĤ뤳ȤǤ롣Υʥ֥åƤʤ
åɤʣ硢ʥ륹åɤϥͥ뤬
̵٤롣
åɤϡ
.BR sigpending (2)
Ȥäơ߽ԤΥʥ뽸뤳ȤǤ롣
νϡץƤνԤʥ
ƤӽФåɰƤΥʥξ鹽롣
.SS ɸॷʥ
Linux ϰʲ˼ɸॷʥбƤ롣
ʥֹΰϥƥ¸Ǥꡢ"" ˼̤Ǥ롣
(3ĤͤƤΤϡ 1ܤ alpha sparc ̾ͭ͡
椬 i386, ppc, sh Ǥ͡Ǹ夬 mips ǤͤǤ롣
\- ϤΥƥˤб륷ʥ뤬ʤȤ)
ǽˡPOSIX.1-1990 Ƥ륷ʥ
.TS
l c c l
____
lB c c l.
ʥ ư
SIGHUP \01 Term T{
ü(controlling terminal)ΥϥåС
ޤ椷Ƥץλ
T}
SIGINT \02 Term ܡɤγ (Interrupt)
SIGQUIT \03 Core ܡɤˤ (Quit)
SIGILL \04 Core ̿
SIGABRT \06 Core \fBabort\fP(3) (Abort) ʥ
SIGFPE \08 Core ư㳰
SIGKILL \09 Term Kill ʥ
SIGSEGV 11 Core ʥ껲
SIGPIPE 13 Term ѥ˲: ɤ̵ѥפؤνФ
SIGALRM 14 Term \fBalarm\fP(2) Υޡʥ
SIGTERM 15 Term λ (termination) ʥ
SIGUSR1 30,10,16 Term 桼ʥ 1
SIGUSR2 31,12,17 Term 桼ʥ 2
SIGCHLD 20,17,18 Ign ҥץΰö (stop) ޤϽλ
SIGCONT 19,18,25 Cont ö (stop) κƳ
SIGSTOP 17,19,23 Stop ץΰö (stop)
SIGTSTP 18,20,24 Stop ü (tty) Ϥ줿ö (stop)
SIGTTIN 21,21,26 Stop Хåɥץ tty
SIGTTOU 22,22,27 Stop Хåɥץ tty
.TE
ʥ
.B SIGKILL
.B SIGSTOP
ϥå֥å̵Ǥʤ
ˡ POSIX.1-1990 ɸˤϤʤ SUSv2
POSIX.1-2001 ˵ҤƤ륷ʥ
.TS
l c c l
____
lB c c l.
ʥ ư
SIGBUS 10,7,10 Core Х顼 (ʥꥢ)
SIGPOLL Term ݡǽʥ٥ (Sys V)
\fBSIGIO\fP Ʊ
SIGPROF 27,27,29 Term profiling ޤλڤ
SIGSYS 12,\-,12 Core 롼ؤΰ (SVr4)
SIGTRAP 5 Core ȥ졼/֥졼ݥ ȥå
SIGURG 16,23,21 Ign T{
åȤζ۵ (urgent condition) (4.2BSD)
T}
SIGVTALRM 26,26,28 Term ۥ顼९å (4.2BSD)
SIGXCPU 24,24,30 Core CPUĶ (4.2BSD)
SIGXFSZ 25,25,31 Core ե륵¤Ķ (4.2BSD)
.TE
Linux 2.2 Ǥϡ
.BR SIGSYS ", " SIGXCPU ", " SIGXFSZ
SPARC MIPS ʳΥƥǤ
.B SIGBUS
ΥǥեȤο (Ϥʤ) ץλǤä
(¾ Unix ƥˤ
.BR SIGXCPU " " SIGXFSZ
ΥǥեȤưפʤΥץλΤΤ롣)
Linux 2.4 ǤϡPOSIX.1-2001 Ǥͤ˽ơ
ΥʥǡץλפϤ
褦ˤʤäƤ롣
ˤ¾γƼ亮ʥ
.TS
l c c l
____
lB c c l.
ʥ ư
SIGIOT 6 C IOT ȥåס\fBSIGABRT\fP Ʊ
SIGEMT 7,\-,7
SIGSTKFLT \-,16,\- A T{
ͱ黻ץåˤ륹åե (̤)
T}
SIGIO 23,29,22 A Ϥǽˤʤä (4.2BSD)
SIGCLD \-,\-,18 \fBSIGCHLD\fP Ʊ
SIGPWR 29,30,19 A ŸӼ (Power failure) (System V)
SIGINFO 29,\-,\- \fBSIGPWR\fP Ʊ
SIGLOST \-,\-,\- A եå줿
SIGWINCH 28,28,20 B T{
ɥ ꥵ ʥ (4.3BSD, Sun)
T}
SIGUNUSED \-,31,\- A ̤ѥʥ (\fBSIGSYS\fP Ȥʤ)
.TE
(ʥ 29 alpha Ǥ
.B SIGINFO
/
.B SIGPWR
sparc Ǥ
.B SIGLOST
Ǥ롣)
.B SIGEMT
POSIX.1-2001 ˵ꤵƤʤ
¾¿ Unix ƥ¸ߤ롣
ǥեȤư¿ξ硢ϤȼץνλǤ롣
.B SIGPWR
(POSIX.1-2001 ˵ꤵƤʤ) Υʥ뤬¸ߤ
¾ Unix ƥǤ¿ξ硢ǥեư̵Ǥ롣
.B SIGIO
(POSIX.1-2001 ˵ꤵƤʤ) Ĥ¾ Unix ƥǤ
ǥեư̵Ǥ롣
.SS ꥢ륿ॷʥ
бƤꥢ륿ॷʥϰϤϡޥ
.B SIGRTMIN
.B SIGRTMAX
롣
POSIX.1-2001 ǤϡʤȤ
.B _POSIX_RTSIG_MAX
(8) ĤΥꥢ륿ॷʥбᤵƤ롣
.PP
Linux ϡ32 Ĥΰۤʤꥢ륿ॷʥбƤꡢ
ֹ 33 64 Ǥ롣
ʤ顢glibc POSIX åɼϡ
2 (NPTL ξ) 3 (LinuxThreads ξ)
ꥢ륿ॷʥѤƤ
.RB ( pthreads (7)
)
.B SIGRTMIN
ͤŬڤ (34 35 ) Ĵ롣
Ѳǽʥꥢ륿ॷʥϰϤ glibc Υåɼˤ
ۤʤ뤷 (Ѥ륫ͥ glibc ˤ¹ԻˤѲ)
Unix ƥμˤäƤۤʤ롣äơ
ץǤϡ֥ϡɥǥȤäƤΥꥢ륿ॷʥ
ȤϷ褷Ƥ٤ǤϤʤס
.BR SIGRTMIN +n
ηǻȤ٤Ǥ롣ޤ
.BR SIGRTMIN +n
.B SIGRTMAX
ĶƤʤΥå (¹Ի) Ŭڤ˹Ԥ٤Ǥ롣
.PP
ɸॷʥȰۤʤꡢꥢ륿ॷʥˤ
줿̣Ϥʤ
ꥢ륿ॷʥץꥱӤ˻Ȥ롣
(âLinuxThreads ǡꥢ륿ॷʥֹΤ
ǽ 3ĤѤƤդ뤳)
.PP
ϥɥʤꥢ륿ॷʥΥǥեȤư
ץνλǤ롣
.PP
ꥢ륿ॷʥϰʲħ:
.IP 1. 4
ꥢ륿ॷʥʣμΤ塼뤳ȤǤ롣
ɸॷʥξ硢Υʥ뤬֥åƤ֤
ƱʥʣΥƤ⡢
1 Ĥ塼롣
.IP 2. 4
ʥ뤬
.BR sigqueue (2)
Ѥ줿硢
°ǡ (ݥ) ʥȶǤ롣
¦ץ
.BR sigaction (2)
.B SA_SIGINFO
ե饰ꤷƥʥϥɥꤷ硢
Υǡ
.I siginfo_t
¤Τ
.I si_value
եɷͳǥϥɥ 2 ȤϤ졢
Ѥ뤳ȤǤ롣
ˡι¤Τ
.I si_pid
.I si_uid
եɤǥʥץ PID ȼ¥桼 ID
뤳ȤǤ롣
.IP 3. 4
ꥢ륿ॷʥǤݾڤ롣
ƱפΥꥢ륿ॷʥ줿֤夹롣
ۤʤꥢ륿ॷʥ뤬ĤΥץ줿硢
ֹξʥ뤫夹롣
(Ĥޤ꾮ֹΥʥ뤬⤤̤ͥġ)
.PP
ĤΥץФɸॷʥȥꥢ륿ॷʥξ
Ԥξ硢POSIX Ϥɤ餬뤫ꤷƤʤ
Linux Ǥϡ¾¿μƱ͡Τ褦ʾˤ
ɸॷʥ뤬ͥ褵롣
.PP
POSIX ˤС1 ץ˺
.B _POSIX_SIGQUEUE_MAX
(32) ĤΥꥢ륿ॷʥ塼٤ȤƤ롣
Linux ǤϰäˤʤäƤ롣ͥ 2.6.7 ޤǤ
(2.6.7 ޤ)ץǥ塼äƤꥢ륿ॷʥ
οιפˤĤƥƥΤǤ¤롣
¤
.I /proc/sys/kernel/rtsig-max
եǸ뤳ȤǤ (¤) ѹǤ롣
طեȤơ
.I /proc/sys/kernel/rtsig-nr
뤳ȤǡĤΥꥢ륿ॷʥ뤬ߥ塼äƤ뤫
Τ뤳ȤǤ롣
Linux 2.6.8 ǡ
.I /proc
ͳΥեϡ
.B RLIMIT_SIGPENDING
¤֤줿
ϡ塼륷ʥ˴ؤƥ桼ñ̤
¤ꤹΤǤ롣
ܤ
.BR setrlimit (2)
ȡ
.SS "Ʊʥǰʴؿ (async-signal-safe functions)"
.PP
¾ξνϥץ¹ԤǤդβսǤ뤿ᡢ
.BR sigaction (2)
.BR signal (2)
Ͽ륷ʥϥɥؿˤդʤФʤʤ
POSIX ˤϡְʴؿ (safe function)פȤǰ롣
ʥ뤬Ǥʤؿμ¹ԤǤ
.I handler
ǤʤؿƤӽФ硢ץεư̤Ǥ롣
POSIX.1-2003 Ǥϡ
ʥϥɥǤΰʸƤӽФݾڤ뤳ȤɬܤδؿȤ
ʲꤵƤ롣
.in +4
.nf
_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()
tcgetpgrp()
tcsendbreak()
tcsetattr()
tcsetpgrp()
time()
timer_getoverrun()
timer_gettime()
timer_settime()
times()
umask()
uname()
unlink()
utime()
wait()
waitpid()
write()
.fi
.in
.SH
POSIX.1
.SH Х
.B SIGIO
.B SIGLOST
ƱͤäƤ롣
.B SIGLOST
ϥͥΥǤϥȥȤƤ롣
եȥˤäƤϥӥɤβǥʥ 29
.B SIGLOST
ȤߤʤƤޤΤ롣
.SH Ϣ
.BR kill (1),
.BR kill (2),
.BR kill\%pg (2),
.BR set\%itimer (2),
.BR set\%rlimit (2),
.BR sget\%mask (2),
.BR sig\%action (2),
.BR sig\%nal (2),
.BR signalfd (2),
.BR sig\%pend\%ing (2),
.BR sig\%proc\%mask (2),
.BR sig\%queue (2),
.BR sig\%suspend (2),
.BR sig\%waitinfo (2),
.BR bsd\%_signal (3),
.BR raise (3),
.BR sig\%vec (3),
.BR sig\%set (3),
.BR str\%signal (3),
.BR sysv\%_signal (3),
.BR core (5),
.BR proc (5),
.BR pthreads (7)
|