mirror of https://github.com/mkerrisk/man-pages
sigaction.2: Add discussion of rt_sigaction(2)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
530156fe3d
commit
1545ed9567
|
@ -48,7 +48,7 @@
|
||||||
.\"
|
.\"
|
||||||
.TH SIGACTION 2 2015-01-22 "Linux" "Linux Programmer's Manual"
|
.TH SIGACTION 2 2015-01-22 "Linux" "Linux Programmer's Manual"
|
||||||
.SH NAME
|
.SH NAME
|
||||||
sigaction \- examine and change a signal action
|
sigaction, rt_sigaction \- examine and change a signal action
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.nf
|
.nf
|
||||||
.B #include <signal.h>
|
.B #include <signal.h>
|
||||||
|
@ -836,6 +836,36 @@ See
|
||||||
.BR signal (7)
|
.BR signal (7)
|
||||||
for a list of the async-signal-safe functions that can be
|
for a list of the async-signal-safe functions that can be
|
||||||
safely called inside from inside a signal handler.
|
safely called inside from inside a signal handler.
|
||||||
|
.\"
|
||||||
|
.SS C library/kernel ABI differences
|
||||||
|
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
|
||||||
|
.IR 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
|
||||||
|
.IR 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
|
||||||
|
.IR act.sa_mask
|
||||||
|
and
|
||||||
|
.IR oldact.sa_mask .
|
||||||
|
This argument is currently required to have the value
|
||||||
|
.IR 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
|
.SS Undocumented
|
||||||
Before the introduction of
|
Before the introduction of
|
||||||
.B SA_SIGINFO
|
.B SA_SIGINFO
|
||||||
|
|
Loading…
Reference in New Issue