From 166b65db90ef277c7c5a9dbb9766c4189af926b6 Mon Sep 17 00:00:00 2001 From: Michael Kerrisk Date: Thu, 19 Feb 2015 10:26:54 +0100 Subject: [PATCH] sigprocmask.2: Add discussion of rt_sigprocmask(2) Signed-off-by: Michael Kerrisk --- man2/sigprocmask.2 | 32 +++++++++++++++++++++++++++++++- 1 file changed, 31 insertions(+), 1 deletion(-) diff --git a/man2/sigprocmask.2 b/man2/sigprocmask.2 index 5c92f9894..d9c99be6d 100644 --- a/man2/sigprocmask.2 +++ b/man2/sigprocmask.2 @@ -28,7 +28,7 @@ .\" .TH SIGPROCMASK 2 2013-04-19 "Linux" "Linux Programmer's Manual" .SH NAME -sigprocmask \- examine and change blocked signals +sigprocmask, rt_sigprocmask \- examine and change blocked signals .SH SYNOPSIS .B #include .sp @@ -141,6 +141,36 @@ or See .BR sigsetops (3) for details on manipulating signal sets. +.\" +.SS C library/kernel ABI differences +The original Linux system call was named +.BR sigprocmask (). +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_sigprocmask (), +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 set +and +.IR oldset . +This argument is currently required to have the value +.IR sizeof(sigset_t) +(or the error +.B EINVAL +results). +The glibc +.BR sigprocmask () +wrapper function hides these details from us, transparently calling +.BR rt_sigprocmask () +when the kernel provides it. +.\" .SH SEE ALSO .BR kill (2), .BR pause (2),