OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man7 / signal.7
index cd55cc9..8cc56bc 100644 (file)
@@ -4,6 +4,7 @@
 .\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
 .\"     <mtk.manpages@gmail.com>
 .\"
 .\" and Copyright (c) 2008 Linux Foundation, written by Michael Kerrisk
 .\"     <mtk.manpages@gmail.com>
 .\"
+.\" %%%LICENSE_START(VERBATIM)
 .\" 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 make and distribute verbatim copies of this
 .\" manual provided the copyright notice and this permission notice are
 .\" preserved on all copies.
@@ -23,6 +24,7 @@
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
 .\"
 .\" Formatted or processed versions of this manual, if unaccompanied by
 .\" the source, must acknowledge the copyright and authors of this work.
+.\" %%%LICENSE_END
 .\"
 .\" 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 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)
 .\"     Added section on stop/cont signals interrupting syscalls.
 .\" 2008-10-05, mtk: various additions
 .\"
 .\"     Added section on stop/cont signals interrupting syscalls.
 .\" 2008-10-05, mtk: various additions
 .\"
-.TH SIGNAL 7  2010-09-19 "Linux" "Linux Programmer's Manual"
+.TH SIGNAL 7  2013-07-30 "Linux" "Linux Programmer's Manual"
 .SH NAME
 signal \- overview of signals
 .SH DESCRIPTION
 Linux supports both POSIX reliable signals (hereinafter
 "standard signals") and POSIX real-time signals.
 .SH NAME
 signal \- overview of signals
 .SH DESCRIPTION
 Linux supports both POSIX reliable signals (hereinafter
 "standard signals") and POSIX real-time signals.
-.SS "Signal Dispositions"
+.SS Signal dispositions
 Each signal has a current
 .IR disposition ,
 which determines how the process behaves when it is delivered
 Each signal has a current
 .IR disposition ,
 which determines how the process behaves when it is delivered
@@ -100,7 +102,7 @@ During an
 .BR execve (2),
 the dispositions of handled signals are reset to the default;
 the dispositions of ignored signals are left unchanged.
 .BR execve (2),
 the dispositions of handled signals are reset to the default;
 the dispositions of ignored signals are left unchanged.
-.SS Sending a Signal
+.SS Sending a signal
 The following system calls and library functions allow
 the caller to send a signal:
 .TP 16
 The following system calls and library functions allow
 the caller to send a signal:
 .TP 16
@@ -124,9 +126,9 @@ Sends a signal to a specified thread within a specific process.
 (This is the system call used to implement
 .BR pthread_kill (3).)
 .TP
 (This is the system call used to implement
 .BR pthread_kill (3).)
 .TP
-.BR sigqueue (2)
+.BR sigqueue (3)
 Sends a real-time signal with accompanying data to a specified process.
 Sends a real-time signal with accompanying data to a specified process.
-.SS Waiting for a Signal to be Caught
+.SS Waiting for a signal to be caught
 The following system calls suspend execution of the calling process
 or thread until a signal is caught
 (or an unhandled signal terminates the process):
 The following system calls suspend execution of the calling process
 or thread until a signal is caught
 (or an unhandled signal terminates the process):
@@ -137,7 +139,7 @@ Suspends execution until any signal is caught.
 .BR sigsuspend (2)
 Temporarily changes the signal mask (see below) and suspends
 execution until one of the unmasked signals is caught.
 .BR sigsuspend (2)
 Temporarily changes the signal mask (see below) and suspends
 execution until one of the unmasked signals is caught.
-.SS Synchronously Accepting a Signal
+.SS Synchronously accepting a signal
 Rather than asynchronously catching a signal via a signal handler,
 it is possible to synchronously accept the signal, that is,
 to block execution until the signal is delivered,
 Rather than asynchronously catching a signal via a signal handler,
 it is possible to synchronously accept the signal, that is,
 to block execution until the signal is delivered,
@@ -165,7 +167,7 @@ call is delivered to the caller.
 The buffer returned by
 .BR read (2)
 contains a structure describing the signal.
 The buffer returned by
 .BR read (2)
 contains a structure describing the signal.
-.SS "Signal Mask and Pending Signals"
+.SS Signal mask and pending signals
 A signal may be
 .IR blocked ,
 which means that it will not be delivered until it is later unblocked.
 A signal may be
 .IR blocked ,
 which means that it will not be delivered until it is later unblocked.
@@ -217,15 +219,17 @@ A child created via
 initially has an empty pending signal set;
 the pending signal set is preserved across an
 .BR execve (2).
 initially has an empty pending signal set;
 the pending signal set is preserved across an
 .BR execve (2).
-.SS "Standard Signals"
+.SS Standard signals
 Linux supports the standard signals listed below.
 Several signal numbers
 are architecture-dependent, as indicated in the "Value" column.
 (Where three values are given, the first one is usually valid for
 alpha and sparc,
 Linux supports the standard signals listed below.
 Several signal numbers
 are architecture-dependent, as indicated in the "Value" column.
 (Where three values are given, the first one is usually valid for
 alpha and sparc,
-the middle one for ix86, ia64, ppc, s390, arm and sh,
+the middle one for x86, arm, and most other architectures,
 and the last one for mips.
 and the last one for mips.
-.\" parisc is a law unto itself
+(Values for parisc are
+.I not
+shown; see the Linux kernel source for signal numbering on that architecture.)
 A \- denotes that a signal is absent on the corresponding architecture.)
 
 First the signals described in the original POSIX.1-1990 standard.
 A \- denotes that a signal is absent on the corresponding architecture.)
 
 First the signals described in the original POSIX.1-1990 standard.
@@ -252,9 +256,9 @@ SIGUSR2     31,12,17        Term    User-defined signal 2
 SIGCHLD        20,17,18        Ign     Child stopped or terminated
 SIGCONT        19,18,25        Cont    Continue if stopped
 SIGSTOP        17,19,23        Stop    Stop process
 SIGCHLD        20,17,18        Ign     Child stopped or terminated
 SIGCONT        19,18,25        Cont    Continue if stopped
 SIGSTOP        17,19,23        Stop    Stop process
-SIGTSTP        18,20,24        Stop    Stop typed at tty
-SIGTTIN        21,21,26        Stop    tty input for background process
-SIGTTOU        22,22,27        Stop    tty output for background process
+SIGTSTP        18,20,24        Stop    Stop typed at terminal
+SIGTTIN        21,21,26        Stop    Terminal input for background process
+SIGTTOU        22,22,27        Stop    Terminal output for background process
 .TE
 
 The signals
 .TE
 
 The signals
@@ -306,7 +310,7 @@ SIGIO       23,29,22        Term    I/O now possible (4.2BSD)
 SIGCLD \-,\-,18        Ign     A synonym for \fBSIGCHLD\fP
 SIGPWR 29,30,19        Term    Power failure (System V)
 SIGINFO        29,\-,\-                A synonym for \fBSIGPWR\fP
 SIGCLD \-,\-,18        Ign     A synonym for \fBSIGCHLD\fP
 SIGPWR 29,30,19        Term    Power failure (System V)
 SIGINFO        29,\-,\-                A synonym for \fBSIGPWR\fP
-SIGLOST        \-,\-,\-        Term    File lock lost
+SIGLOST        \-,\-,\-        Term    File lock lost (unused)
 SIGWINCH       28,28,20        Ign     Window resize signal (4.3BSD, Sun)
 SIGUNUSED      \-,31,\-        Core    Synonymous with \fBSIGSYS\fP
 .TE
 SIGWINCH       28,28,20        Ign     Window resize signal (4.3BSD, Sun)
 SIGUNUSED      \-,31,\-        Core    Synonymous with \fBSIGSYS\fP
 .TE
@@ -339,7 +343,7 @@ is synonymous with
 .\" parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
 .B SIGSYS
 on most architectures.
 .\" parisc is the only exception: SIGSYS is 12, SIGUNUSED is 31
 .B SIGSYS
 on most architectures.
-.SS "Real-time Signals"
+.SS Real-time signals
 Linux supports real-time signals as originally defined in the POSIX.1b
 real-time extensions (and now included in POSIX.1-2001).
 The range of supported real-time signals is defined by the macros
 Linux supports real-time signals as originally defined in the POSIX.1b
 real-time extensions (and now included in POSIX.1-2001).
 The range of supported real-time signals is defined by the macros
@@ -375,8 +379,6 @@ does not exceed
 Unlike standard signals, real-time signals have no predefined meanings:
 the entire set of real-time signals can be used for application-defined
 purposes.
 Unlike standard signals, real-time signals have no predefined meanings:
 the entire set of real-time signals can be used for application-defined
 purposes.
-(Note, however, that the LinuxThreads implementation uses the first
-three real-time signals.)
 .PP
 The default action for an unhandled real-time signal is to terminate the
 receiving process.
 .PP
 The default action for an unhandled real-time signal is to terminate the
 receiving process.
@@ -388,13 +390,13 @@ By contrast, if multiple instances of a standard signal are delivered
 while that signal is currently blocked, then only one instance is queued.
 .IP 2. 4
 If the signal is sent using
 while that signal is currently blocked, then only one instance is queued.
 .IP 2. 4
 If the signal is sent using
-.BR sigqueue (2),
+.BR sigqueue (3),
 an accompanying value (either an integer or a pointer) can be sent
 with the signal.
 If the receiving process establishes a handler for this signal using the
 .B SA_SIGINFO
 flag to
 an accompanying value (either an integer or a pointer) can be sent
 with the signal.
 If the receiving process establishes a handler for this signal using the
 .B SA_SIGINFO
 flag to
-.BR sigaction (2)
+.BR sigaction (2),
 then it can obtain this data via the
 .I si_value
 field of the
 then it can obtain this data via the
 .I si_value
 field of the
@@ -443,7 +445,7 @@ resource limit, which specifies a per-user limit for queued
 signals; see
 .BR setrlimit (2)
 for further details.
 signals; see
 .BR setrlimit (2)
 for further details.
-.SS "Async-signal-safe functions"
+.SS Async-signal-safe functions
 .PP
 A signal handler function must be very careful,
 since processing elsewhere may be interrupted
 .PP
 A signal handler function must be very careful,
 since processing elsewhere may be interrupted
@@ -607,7 +609,7 @@ utimensat()
 utimes()
 .fi
 .in
 utimes()
 .fi
 .in
-.SS Interruption of System Calls and Library Functions by Signal Handlers
+.SS Interruption of system calls and library functions by signal handlers
 If a signal handler is invoked while a system call or library
 function call is blocked, then either:
 .IP * 2
 If a signal handler is invoked while a system call or library
 function call is blocked, then either:
 .IP * 2
@@ -774,7 +776,7 @@ The
 .BR sleep (3)
 function is also never restarted if interrupted by a handler,
 but gives a success return: the number of seconds remaining to sleep.
 .BR sleep (3)
 function is also never restarted if interrupted by a handler,
 but gives a success return: the number of seconds remaining to sleep.
-.SS Interruption of System Calls and Library Functions by Stop Signals
+.SS Interruption of system calls and library functions by stop signals
 On Linux, even in the absence of signal handlers,
 certain blocking interfaces can fail with the error
 .BR EINTR
 On Linux, even in the absence of signal handlers,
 certain blocking interfaces can fail with the error
 .BR EINTR
@@ -833,22 +835,25 @@ Linux 2.6.8 and earlier:
 Linux 2.4 and earlier:
 .BR nanosleep (2).
 .RE
 Linux 2.4 and earlier:
 .BR nanosleep (2).
 .RE
-.SH "CONFORMING TO"
+.SH CONFORMING TO
 POSIX.1, except as noted.
 POSIX.1, except as noted.
-.SH BUGS
-.B SIGIO
-and
-.B SIGLOST
-have the same value.
-The latter is commented out in the kernel source, but
-the build process of some software still thinks that
-signal 29 is
-.BR SIGLOST .
-.SH "SEE ALSO"
+.\" It must be a *very* long time since this was true:
+.\" .SH BUGS
+.\" .B SIGIO
+.\" and
+.\" .B SIGLOST
+.\" have the same value.
+.\" The latter is commented out in the kernel source, but
+.\" the build process of some software still thinks that
+.\" signal 29 is
+.\" .BR SIGLOST .
+.SH SEE ALSO
 .BR kill (1),
 .BR getrlimit (2),
 .BR kill (2),
 .BR killpg (2),
 .BR kill (1),
 .BR getrlimit (2),
 .BR kill (2),
 .BR killpg (2),
+.BR restart_syscall (2),
+.BR rt_sigqueueinfo (2),
 .BR setitimer (2),
 .BR setrlimit (2),
 .BR sgetmask (2),
 .BR setitimer (2),
 .BR setrlimit (2),
 .BR sgetmask (2),
@@ -858,13 +863,14 @@ signal 29 is
 .BR signalfd (2),
 .BR sigpending (2),
 .BR sigprocmask (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 sigsuspend (2),
 .BR sigwaitinfo (2),
 .BR abort (3),
 .BR bsd_signal (3),
 .BR longjmp (3),
 .BR raise (3),
+.BR pthread_sigqueue (3),
+.BR sigqueue (3),
 .BR sigset (3),
 .BR sigsetops (3),
 .BR sigvec (3),
 .BR sigset (3),
 .BR sigsetops (3),
 .BR sigvec (3),
@@ -875,3 +881,12 @@ signal 29 is
 .BR proc (5),
 .BR pthreads (7),
 .BR sigevent (7)
 .BR proc (5),
 .BR pthreads (7),
 .BR sigevent (7)
+.SH COLOPHON
+This page is part of release 3.68 of the Linux
+.I man-pages
+project.
+A description of the project,
+information about reporting bugs,
+and the latest version of this page,
+can be found at
+\%http://www.kernel.org/doc/man\-pages/.