aboutsummaryrefslogtreecommitdiffstats
path: root/man2/sigaction.2
diff options
context:
space:
mode:
Diffstat (limited to 'man2/sigaction.2')
-rw-r--r--man2/sigaction.2160
1 files changed, 81 insertions, 79 deletions
diff --git a/man2/sigaction.2 b/man2/sigaction.2
index c352da8b5c..6c241561b3 100644
--- a/man2/sigaction.2
+++ b/man2/sigaction.2
@@ -942,35 +942,63 @@ This will also be generated if an attempt
is made to change the action for
.BR SIGKILL " or " SIGSTOP ,
which cannot be caught or ignored.
+.SH VERSIONS
+.SS C library/kernel differences
+The glibc wrapper function for
+.BR sigaction ()
+gives an error
+.RB ( EINVAL )
+on attempts to change the disposition of the two real-time signals
+used internally by the NPTL threading implementation.
+See
+.BR nptl (7)
+for details.
+.PP
+On architectures where the signal trampoline resides in the C library,
+the glibc wrapper function for
+.BR sigaction ()
+places the address of the trampoline code in the
+.I act.sa_restorer
+field and sets the
+.B SA_RESTORER
+flag in the
+.I act.sa_flags
+field.
+See
+.BR sigreturn (2).
+.PP
+The original Linux system call was named
+.BR sigaction ().
+However, with the addition of real-time signals in Linux 2.2,
+the fixed-size, 32-bit
+.I sigset_t
+type supported by that system call was no longer fit for purpose.
+Consequently, a new system call,
+.BR rt_sigaction (),
+was added to support an enlarged
+.I sigset_t
+type.
+The new system call takes a fourth argument,
+.IR "size_t sigsetsize" ,
+which specifies the size in bytes of the signal sets in
+.I act.sa_mask
+and
+.IR oldact.sa_mask .
+This argument is currently required to have the value
+.I sizeof(sigset_t)
+(or the error
+.B EINVAL
+results).
+The glibc
+.BR sigaction ()
+wrapper function hides these details from us, transparently calling
+.BR rt_sigaction ()
+when the kernel provides it.
.SH STANDARDS
-POSIX.1-2001, POSIX.1-2008, SVr4.
+POSIX.1-2008.
+.SH HISTORY
+POSIX.1-2001, SVr4.
.\" SVr4 does not document the EINTR condition.
-.SH NOTES
-A child created via
-.BR fork (2)
-inherits a copy of its parent's signal dispositions.
-During an
-.BR execve (2),
-the dispositions of handled signals are reset to the default;
-the dispositions of ignored signals are left unchanged.
-.PP
-According to POSIX, the behavior of a process is undefined after it
-ignores a
-.BR SIGFPE ,
-.BR SIGILL ,
-or
-.B SIGSEGV
-signal that was not generated by
-.BR kill (2)
-or
-.BR raise (3).
-Integer division by zero has undefined result.
-On some architectures it will generate a
-.B SIGFPE
-signal.
-(Also dividing the most negative integer by \-1 may generate
-.BR SIGFPE .)
-Ignoring this signal might lead to an endless loop.
.PP
POSIX.1-1990 disallowed setting the action for
.B SIGCHLD
@@ -1018,6 +1046,32 @@ allowed the receipt of any signal, not just the one we are installing
(effectively overriding any
.I sa_mask
settings).
+.SH NOTES
+A child created via
+.BR fork (2)
+inherits a copy of its parent's signal dispositions.
+During an
+.BR execve (2),
+the dispositions of handled signals are reset to the default;
+the dispositions of ignored signals are left unchanged.
+.PP
+According to POSIX, the behavior of a process is undefined after it
+ignores a
+.BR SIGFPE ,
+.BR SIGILL ,
+or
+.B SIGSEGV
+signal that was not generated by
+.BR kill (2)
+or
+.BR raise (3).
+Integer division by zero has undefined result.
+On some architectures it will generate a
+.B SIGFPE
+signal.
+(Also dividing the most negative integer by \-1 may generate
+.BR SIGFPE .)
+Ignoring this signal might lead to an endless loop.
.PP
.BR sigaction ()
can be called with a NULL second argument to query the current signal
@@ -1040,58 +1094,6 @@ See
for a list of the async-signal-safe functions that can be
safely called inside from inside a signal handler.
.\"
-.SS C library/kernel differences
-The glibc wrapper function for
-.BR sigaction ()
-gives an error
-.RB ( EINVAL )
-on attempts to change the disposition of the two real-time signals
-used internally by the NPTL threading implementation.
-See
-.BR nptl (7)
-for details.
-.PP
-On architectures where the signal trampoline resides in the C library,
-the glibc wrapper function for
-.BR sigaction ()
-places the address of the trampoline code in the
-.I act.sa_restorer
-field and sets the
-.B SA_RESTORER
-flag in the
-.I act.sa_flags
-field.
-See
-.BR sigreturn (2).
-.PP
-The original Linux system call was named
-.BR sigaction ().
-However, with the addition of real-time signals in Linux 2.2,
-the fixed-size, 32-bit
-.I sigset_t
-type supported by that system call was no longer fit for purpose.
-Consequently, a new system call,
-.BR rt_sigaction (),
-was added to support an enlarged
-.I sigset_t
-type.
-The new system call takes a fourth argument,
-.IR "size_t sigsetsize" ,
-which specifies the size in bytes of the signal sets in
-.I act.sa_mask
-and
-.IR oldact.sa_mask .
-This argument is currently required to have the value
-.I sizeof(sigset_t)
-(or the error
-.B EINVAL
-results).
-The glibc
-.BR sigaction ()
-wrapper function hides these details from us, transparently calling
-.BR rt_sigaction ()
-when the kernel provides it.
-.\"
.SS Undocumented
Before the introduction of
.BR SA_SIGINFO ,