1SIGPENDING(2)              Linux Programmer's Manual             SIGPENDING(2)
2
3
4

NAME

6       sigpending, rt_sigpending - examine pending signals
7

SYNOPSIS

9       #include <signal.h>
10
11       int sigpending(sigset_t *set);
12
13   Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
14
15       sigpending():
16           _POSIX_C_SOURCE
17

DESCRIPTION

19       sigpending()  returns  the set of signals that are pending for delivery
20       to the calling thread (i.e., the signals which have been  raised  while
21       blocked).  The mask of pending signals is returned in set.
22

RETURN VALUE

24       sigpending()  returns 0 on success.  On failure, -1 is returned and er‐
25       rno is set to indicate the error.
26

ERRORS

28       EFAULT set points to memory which is not a valid part  of  the  process
29              address space.
30

CONFORMING TO

32       POSIX.1-2001, POSIX.1-2008.
33

NOTES

35       See sigsetops(3) for details on manipulating signal sets.
36
37       If  a  signal is both blocked and has a disposition of "ignored", it is
38       not added to the mask of pending signals when generated.
39
40       The set of signals that is pending for a thread is the union of the set
41       of  signals that is pending for that thread and the set of signals that
42       is pending for the process as a whole; see signal(7).
43
44       A child created via fork(2) initially has an empty pending signal  set;
45       the pending signal set is preserved across an execve(2).
46
47   C library/kernel differences
48       The  original  Linux system call was named sigpending().  However, with
49       the addition of real-time signals in Linux 2.2, the fixed-size,  32-bit
50       sigset_t  argument  supported by that system call was no longer fit for
51       purpose.  Consequently, a new system call, rt_sigpending(),  was  added
52       to support an enlarged sigset_t type.  The new system call takes a sec‐
53       ond argument, size_t sigsetsize, which specifies the size in  bytes  of
54       the  signal  set in set.  The glibc sigpending() wrapper function hides
55       these details from us, transparently calling rt_sigpending()  when  the
56       kernel provides it.
57

BUGS

59       In  versions  of glibc up to and including 2.2.1, there is a bug in the
60       wrapper function for sigpending() which means  that  information  about
61       pending real-time signals is not correctly returned.
62

SEE ALSO

64       kill(2), sigaction(2), signal(2), sigprocmask(2), sigsuspend(2), sigse‐
65       tops(3), signal(7)
66

COLOPHON

68       This page is part of release 5.12 of the Linux  man-pages  project.   A
69       description  of  the project, information about reporting bugs, and the
70       latest    version    of    this    page,    can     be     found     at
71       https://www.kernel.org/doc/man-pages/.
72
73
74
75Linux                             2021-03-22                     SIGPENDING(2)
Impressum