sigpending.2: Add discussion of rt_sigpending(2)

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2015-02-19 10:23:37 +01:00
parent 1545ed9567
commit 78898dc791
1 changed files with 29 additions and 1 deletions

View File

@ -28,7 +28,7 @@
.\"
.TH SIGPENDING 2 2013-12-11 "Linux" "Linux Programmer's Manual"
.SH NAME
sigpending \- examine pending signals
sigpending, rt_sigpending \- examine pending signals
.SH SYNOPSIS
.B #include <signal.h>
.sp
@ -82,6 +82,34 @@ A child created via
initially has an empty pending signal set;
the pending signal set is preserved across an
.BR execve (2).
.\"
.SS C library/kernel ABI differences
The original Linux system call was named
.BR sigpending ().
However, with the addition of real-time signals in Linux 2.2,
the fixed-size, 32-bit
.IR sigset_t
argument supported by that system call was no longer fit for purpose.
Consequently, a new system call,
.BR rt_sigpending (),
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 set .
.\" This argument is currently required to be less than or equal to
.\" .IR sizeof(sigset_t)
.\" (or the error
.\" .B EINVAL
.\" results).
The glibc
.BR sigpending ()
wrapper function hides these details from us, transparently calling
.BR rt_sigpending ()
when the kernel provides it.
.\"
.SH BUGS
In versions of glibc up to and including 2.2.1,
there is a bug in the wrapper function for