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 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887
|
'\" t
.\" Copyright (c) 1993 by Thomas Koenig (ig25@rz.uni-karlsruhe.de)
.\" and Copyright (c) 2002, 2006 by Michael Kerrisk <mtk.manpages@gmail.com>
.\" and Copyright (c) 2008 Linux Foundation, written 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.
.\" 2008-07-04, mtk:
.\" Added section on system call restarting (SA_RESTART)
.\" Added section on stop/cont signals interrupting syscalls.
.\" 2008-10-05, mtk: various additions
.\"
.\" Japanese Version Copyright (c) 1997 Takafumi Naka
.\" and 2005-2008 Akihiro MOTOKI
.\" 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>, LDP v1.28
.\" 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
.\" Updated 2008-08-11, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.05
.\" Updated 2008-11-21, Akihiro MOTOKI <amotoki@dd.iij4u.or.jp>, LDP v3.13
.\"
.\"WORD: disposition ˡ
.\"WORD: pending Ԥ
.\"WORD: signal handler ʥϥɥ
.\"
.TH SIGNAL 7 2008-10-15 "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)"
ǥʥª롣ʥϥɥȤϡʥ
ưŪ˵ưץδؿǤ롣
(ǥեȤǤϡʥϥɥ̾ΥץΥåǵư롣
ʥϥɥ餬إå (alternate stack) Ѥ褦ꤹ
ȤǤ롣إåѤ褦ꤹˡȡɤΤ褦ʺݤ
إåΩĤˤĤƤεˤĤƤ
.BR sigaltstack (2)
ȤΤȡ
ʥνˡϥץñ̤°Ǥ롣
ޥåɤΥץꥱǤϡ륷ʥνˡ
ƤΥåɤƱǤ롣
.BR fork (2)
Ǻ줿ҥץϿƥץΥʥνˡΥԡѾ롣
.BR execve (2)
δ֡ϥɥ餬ϿƤ륷ʥνˡϥǥեȤ˥ꥻå
졢̵ȤʤäƤ륷ʥνˡѹ줺ΤޤޤȤʤ롣
.SS ʥ
ʲΥƥॳȥ饤֥ؿȤäơ
ƤӽФԤϥʥ뤳ȤǤ롣
.TP 16
.BR raise (3)
ƤӽФåɤ˥ʥ롣
.TP
.BR kill (2)
ꤵ줿ץ䡢ꤵ줿ץ롼פС
ƥץ˥ʥ롣
.TP
.BR killpg (2)
ꤵ줿ץ롼פС˥ʥ롣
.TP
.BR pthread_kill (3)
ƤӽФԤƱץλꤵ줿 POSIX åɤ˥ʥ롣
.TP
.BR tgkill (2)
ꤵ줿ץλꤵ줿åɤ˥ʥ
(ΥƥॳȤä
.BR pthread_kill (3)
ϼƤ)
.TP
.BR sigqueue (2)
ꤵ줿ץ°ǡȤȤ˥ꥢ륿ॷʥ롣
.SS ʥ뤬ªΤԤ
ʲΥƥॳȤäơʥ뤬ªޤ
ƤӽФץ䥹åɤμ¹Ԥ (suspend) 뤳ȤǤ
(ϥɥ餬ꤵƤʤʥˤꤽΥץλ
ˤ¹ԤߤϽλ)
.TP 16
.BR pause (2)
ʥ뤬ªޤǼ¹Ԥߤ롣
.TP
.BR sigsuspend (2)
Ū˥ʥޥ () ѹ
ޥƤʤʥΤ줫ªޤ
¹ԤǤ롣
.SS ʥƱ
ʥϥɥͳǥʥƱ (asynchronously) ªʳˤ⡢
ʥƱ (synchronously) Ƽդ뤳ȤǤ롣
ƱƼդȤϡʥ뤬ޤǼ¹Ԥ (block)
ȤȤǤ롣ʥդݤˡͥ
Υʥ˴ؤƤӽФԤ֤
ԤŪˡĤ롣
.IP * 2
.BR sigwaitinfo (2),
.BR sigtimedwait (2),
.BR sigwait (3)
ϡꤵ줿ʥ뽸ΥʥΰĤޤǼ¹ԤǤ롣
ɤΥƥॳؿǤ⡢줿ʥ˴ؤ֤롣
.IP *
.BR signalfd (2)
֤եǥץȤȡƤӽФ줿
ʥ˴ؤɤ߽ФȤǤ롣
Υեǥץ
.BR read (2)
ϡ
.BR signalfd (2)
θƤӽФ˻ꤵ줿ʥ뽸ΥʥΰĤƤӽФ
ޤ (block) 롣
.BR read (2)
֤Хåեˤϥʥ˴ؤǼ¤ΤäƤ롣
.SS ʥޥȽԤʥ
ʥ
.I "֥å (block)"
뤳Ȥ롣֥åȡΥʥ
θ֥åޤʤʤ롣
ʥ뤬ƤޤǤδ֡Υʥ
.I "Ԥ (pending)"
ǤȸƤФ롣
ץγƥåɤϡ줾Ω
.I "ʥޥ (signal mask)"
ġʥޥϤΥåɤߥ֥åƤ
ʥ뽸ΤǤ롣
åɤϡ
.BR pthread_sigmask (3)
ȤäƼʬΥʥޥǤ롣
Ūʥ륹åɤΥץꥱǤϡ
.BR sigprocmask (2)
ȤäơʥޥǤ롣
.BR fork (2)
ͳǺ줿ҥץϡ
ƥץΥʥޥΥԡѾ롣
.BR execve (2)
ǥʥޥݻ롣
륷ʥ (äƽԤȤʤ륷ʥ) ˤϡ
ץΰƤΥåɰƤ롣
㤨СץΰƤΥʥ
.BR kill (2)
Ȥä롣
Υޥ̿μ¹Ԥη̤Ȥ롢
.B SIGSEGV
.B SIGFPE
ʤɤΥʥϡåɰƤȤʤ롣
ޤ
.BR pthread_kill (3)
ȤäΥåɰƤ줿ʥ
åɰƤȤʤ롣
ץƤΥʥϡΥʥ֥åƤʤåɤΤ
줫ΰĤ뤳ȤǤ롣Υʥ֥åƤʤ
åɤʣ硢ʥ륹åɤϥͥ뤬
̵٤롣
åɤϡ
.BR sigpending (2)
Ȥäơ߽ԤΥʥ뽸뤳ȤǤ롣
νϡץƤνԤʥ
ƤӽФåɰƤΥʥξ鹽롣
.BR fork (2)
ͳǺ줿ҥץǤϡԤΥʥ뽸
νǽ롣
.BR execve (2)
ǡԤΥʥ뽸ݻ롣
.SS ɸॷʥ
Linux ϰʲ˼ɸॷʥбƤ롣
ʥֹΰϥƥ¸Ǥꡢ"" ˼̤Ǥ롣
(3ĤͤƤΤϡ 1ܤ alpha sparc ̾ͭ͡
椬 ix86, ia64, ppc, s390, arm, sh Ǥ͡Ǹ夬 mips ǤͤǤ롣
.\" parisc is a law unto itself
\- ϤΥƥˤб륷ʥ뤬ʤȤ)
ǽˡ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 Core IOT ȥåס\fBSIGABRT\fP Ʊ
SIGEMT 7,\-,7 Term
SIGSTKFLT \-,16,\- A T{
ͱ黻ץåˤ륹åե (̤)
T}
SIGIO 23,29,22 Term Ϥǽˤʤä (4.2BSD)
SIGCLD \-,\-,18 Ign \fBSIGCHLD\fP Ʊ
SIGPWR 29,30,19 Term ŸӼ (Power failure) (System V)
SIGINFO 29,\-,\- \fBSIGPWR\fP Ʊ
SIGLOST \-,\-,\- Term եå줿
SIGWINCH 28,28,20 Ign T{
ɥ ꥵ ʥ (4.3BSD, Sun)
T}
SIGUNUSED \-,31,\- Term ̤ѥʥ (\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 ꥢ륿ॷʥ
Linux ϥꥢ륿ॷʥݡȤƤ롣
ꥢ륿ॷʥϸ POSIX.1b Υꥢ륿ĥ
ΤǤꡢߤǤ POSIX.1-2001 ˴ޤޤƤ롣
бƤꥢ륿ॷʥϰϤϡޥ
.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-2004 (POSIX.1-2001 Technical Corrigendum (ɽ) 2 Ȥ) Ǥϡ
ʥϥɥǤΰʸƤӽФݾڤ뤳ȤɬܤδؿȤ
ʲꤵƤ롣
.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()
sockatmark()
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
.PP
POSIX.1-2008 Ǥϡ嵭ΥꥹȤΤ fpathconf(), pathconf(), sysconf()
졢ʲδؿɲä줿
.PP
.in +4n
.nf
execl()
execv()
faccessat()
fchmodat()
fchownat()
fexecve()
fstatat()
futimens()
linkat()
mkdirat()
mkfifoat()
mknod()
mknodat()
openat()
readlinkat()
renameat()
symlinkat()
unlinkat()
utimensat()
utimes()
.fi
.in
.SS ʥϥɥˤ륷ƥॳ饤֥ؿؤγ
ƥॳ饤֥꤬ (block) Ƥ֤˥ʥϥɥ餬
ưȡʲΤɤ餫Ȥʤ롣
.IP * 2
ʥ뤬֤ä塢ƤӽФϼưŪ˺ƥȤ롣
.IP *
ƤӽФϥ顼
.B EINTR
ǼԤ롣
.PP
ĤεưΤɤ餬뤫ϡեˤ¸
ʥϥɥ餬
.B SA_RESTART
ե饰
.RB ( sigaction (2)
) ȤäꤵƤˤ¸롣
ܺ٤ Unix ƥˤäưۤʤ롣
Linux ˤܺ٤ʲ롣
ʲΥեΤ줫θƤӽФߤƤ֤
ʥϥɥˤޤ줿硢
.B SA_RESTART
ե饰ѤƤСʥϥɥ餬֤ä
θƤӽФϼưŪ˺ƥȤ뤳Ȥˤʤ롣
ʳξϡθƤӽФϥ顼
.B EINTR
ǼԤ뤳Ȥˤʤ롣
.\" ʲΥƥॳ ERESTARTSYS ȤäƤ롣
.\" ΤᡢϺƥȤǽǤ롣
.RS 4
.IP * 2
.BR read (2),
.BR readv (2),
.BR write (2),
.BR writev (2),
.BR ioctl (2)
Ρ٤ (slow)ץǥХФƤӽФ
Ǥ٤ץǥХȤϡI/O ƤӽФ̵¤ (block)
ǽΤǥХΤȤǡȤƤüѥסåȤ
(Ǥϡǥ٤ǥХǤϤʤ)
٤ǥХФ I/O ƤӽФ
ʥϥɥˤޤ줿ޤǤ˲餫Υǡ
ǤžƤСƤӽФơ
(̾ϡž줿Хȿ) ֤Ȥ
.IP *
(block) ǽΤ
.BR open (2)
(㤨СFIFO Υץ;
.BR fifo (7)
)
.IP *
.BR wait (2),
.BR wait3 (2),
.BR wait4 (2),
.BR waitid (2),
.BR waitpid (2).
.IP *
åȥե:
.\" If a timeout (setsockopt()) is in effect on the socket, then these
.\" system calls switch to using EINTR. Consequently, they and are not
.\" automatically restarted, and they show the stop/cont behavior
.\" described below. (Verified from 2.6.26 source, and by experiment; mtk)
.BR accept (2),
.BR connect (2),
.BR recv (2),
.BR recvfrom (2),
.BR recvmsg (2),
.BR send (2),
.BR sendto (2),
.BR sendmsg (2).
âåȤ˥ॢȤꤵƤʤ ()
.IP *
եåѥե:
.BR flock (2),
.BR fcntl (2)
.BR F_SETLKW .
.IP *
POSIX å塼ե:
.BR mq_receive (3),
.BR mq_timedreceive (3),
.BR mq_send (3),
.BR mq_timedsend (3).
.IP *
.BR futex (2)
.B FUTEX_WAIT
(Linux 2.6.22 ʹ; Ͼ
.B EINTR
ǼԤƤ)
.IP *
POSIX ޥեե:
.BR sem_wait (3),
.BR sem_timedwait (3)
(Linux 2.6.22 ʹ; Ͼ
.B EINTR
ǼԤƤ)
.RE
.PP
ʲΥեϡ
.B SA_RESTART
ȤäƤɤ˴ؤ餺ʥϥɥˤޤ줿塢
ƥȤ뤳ȤϷ褷Ƥʤ
ϡʥϥɥˤޤȡ˥顼
.B EINTR
ǼԤ롣
.\" ϡʥϥɥˤߤκݤ
.\" EINTR ERESTARTNOHAND ֤ƥॳǤ롣
.RS 4
.IP * 2
.BR setsockopt (2)
ȤäƥॢȤꤵƤ륽åȥե:
.BR accept (2),
.BR recv (2),
.BR recvfrom (2),
.BR recvmsg (2)
Ǽॢ
.RB ( SO_RCVTIMEO )
ꤵƤȡ
.BR connect (2),
.BR send (2),
.BR sendto (2),
.BR sendmsg (2)
ॢ
.RB ( SO_SNDTIMEO )
ꤵƤ硣
.IP *
ʥԤ˻Ȥ륤ե:
.BR pause (2),
.BR sigsuspend (2),
.BR sigtimedwait (2),
.BR sigwaitinfo (2).
.IP *
եǥץ¿ťե:
.BR epoll_wait (2),
.BR epoll_pwait (2),
.BR poll (2),
.BR ppoll (2),
.BR select (2),
.BR pselect (2).
.IP *
System V IPC ե:
.\" On some other systems, SA_RESTART does restart these system calls
.BR msgrcv (2),
.BR msgsnd (2),
.BR semop (2),
.BR semtimedop (2).
.IP *
ѤΥե:
.BR clock_nanosleep (2),
.BR nanosleep (2),
.BR usleep (3).
.IP *
.BR inotify (7)
եǥץ
.BR read (2).
.IP *
.BR io_getevents (2).
.RE
.PP
.BR sleep (3)
ؿ⡢ϥɥˤޤ줿硢褷ƺƥȤ뤳ȤϤʤ
ȤʤꡢĤäƤ֤֤
.SS ߥʥˤ륷ƥॳ饤֥ؿؤγ
Linux Ǥϡʥϥɥ餬ꤵƤʤǤ⡢
ĤΥ֥åΥեϡ
ץ (stop) ʥΰĤˤߤ졢
.B SIGCONT
ˤƳ줿ˡ顼
.B EINTR
ǼԤǽ롣
εư POSIX.1 ǧƤ餺¾ΥƥǤϵʤ
εư Linux Υեϰʲ̤Ǥ롣
.RS 4
.IP * 2
.BR setsockopt (2)
ȤäƥॢȤꤵƤ륽åȥե:
.BR accept (2),
.BR recv (2),
.BR recvfrom (2),
.BR recvmsg (2)
Ǽॢ
.RB ( SO_RCVTIMEO )
ꤵƤȡ
.BR connect (2),
.BR send (2),
.BR sendto (2),
.BR sendmsg (2)
ॢ
.RB ( SO_SNDTIMEO )
ꤵƤ硣
.IP * 2
.BR epoll_wait (2),
.BR epoll_pwait (2).
.IP *
.BR semop (2),
.BR semtimedop (2).
.IP *
.BR sigtimedwait (2),
.BR sigwaitinfo (2).
.IP *
.BR inotify (7)
եǥץ
.BR read (2).
.IP *
Linux 2.6.21 :
.BR futex (2)
.BR FUTEX_WAIT ,
.BR sem_timedwait (3),
.BR sem_wait (3).
.IP *
Linux 2.6.8 :
.BR msgrcv (2),
.BR msgsnd (2).
.IP *
Linux 2.4 :
.BR nanosleep (2).
.RE
.SH
POSIX.1 (ưʳ)
.SH Х
.B SIGIO
.B SIGLOST
ƱͤäƤ롣
.B SIGLOST
ϥͥΥǤϥȥȤƤ롣
եȥˤäƤϥӥɤβǥʥ 29
.B SIGLOST
ȤߤʤƤޤΤ롣
.SH Ϣ
.BR kill (1),
.BR getrlimit (2),
.BR kill (2),
.BR killpg (2),
.BR setitimer (2),
.BR setrlimit (2),
.BR sgetmask (2),
.BR sigaction (2),
.BR sigaltstack (2),
.BR signal (2),
.BR signalfd (2),
.BR sigpending (2),
.BR sigprocmask (2),
.BR sigqueue (2),
.BR sigsuspend (2),
.BR sigwaitinfo (2),
.BR abort (3),
.BR bsd_signal (3),
.BR longjmp (3),
.BR raise (3),
.BR sigset (3),
.BR sigsetops (3),
.BR sigvec (3),
.BR sigwait (3),
.BR strsignal (3),
.BR sysv_signal (3),
.BR core (5),
.BR proc (5),
.BR pthreads (7)
|