sigsuspend.2: Add discussion of rt_sigsuspend(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-02-19 11:04:14 +01:00
parent d893db6462
commit 1edfe5acea
1 changed files with 29 additions and 1 deletions

View File

@ -28,7 +28,7 @@
.\"
.TH SIGSUSPEND 2 2013-04-19 "Linux" "Linux Programmer's Manual"
.SH NAME
sigsuspend \- wait for a signal
sigsuspend, rt_sigsuspend \- wait for a signal
.SH SYNOPSIS
.B #include <signal.h>
.sp
@ -105,6 +105,34 @@ argument).
See
.BR sigsetops (3)
for details on manipulating signal sets.
.\"
.SS C library/kernel ABI differences
The original Linux system call was named
.BR sigsuspend ().
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_sigsuspend (),
was added to support an enlarged
.IR sigset_t
type.
The new system call takes a second argument,
.IR "size_t sigsetsize" ,
which specifies the size in bytes of the signal set in
.IR mask .
This argument is currently required to have the value
.IR sizeof(sigset_t)
(or the error
.B EINVAL
results).
The glibc
.BR sigsuspend ()
wrapper function hides these details from us, transparently calling
.BR rt_sigsuspend ()
when the kernel provides it.
.\"
.SH SEE ALSO
.BR kill (2),
.BR pause (2),