1SIGPENDING(2) Linux Programmer's Manual SIGPENDING(2)
2
3
4
6 sigpending, rt_sigpending - examine pending signals
7
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(): _POSIX_C_SOURCE
16
18 sigpending() returns the set of signals that are pending for delivery
19 to the calling thread (i.e., the signals which have been raised while
20 blocked). The mask of pending signals is returned in set.
21
23 sigpending() returns 0 on success and -1 on error. In the event of an
24 error, errno is set to indicate the cause.
25
27 EFAULT set points to memory which is not a valid part of the process
28 address space.
29
31 POSIX.1-2001, POSIX.1-2008.
32
34 See sigsetops(3) for details on manipulating signal sets.
35
36 If a signal is both blocked and has a disposition of "ignored", it is
37 not added to the mask of pending signals when generated.
38
39 The set of signals that is pending for a thread is the union of the set
40 of signals that is pending for that thread and the set of signals that
41 is pending for the process as a whole; see signal(7).
42
43 A child created via fork(2) initially has an empty pending signal set;
44 the pending signal set is preserved across an execve(2).
45
46 C library/kernel differences
47 The original Linux system call was named sigpending(). However, with
48 the addition of real-time signals in Linux 2.2, the fixed-size, 32-bit
49 sigset_t argument supported by that system call was no longer fit for
50 purpose. Consequently, a new system call, rt_sigpending(), was added
51 to support an enlarged sigset_t type. The new system call takes a sec‐
52 ond argument, size_t sigsetsize, which specifies the size in bytes of
53 the signal set in set. The glibc sigpending() wrapper function hides
54 these details from us, transparently calling rt_sigpending() when the
55 kernel provides it.
56
58 In versions of glibc up to and including 2.2.1, there is a bug in the
59 wrapper function for sigpending() which means that information about
60 pending real-time signals is not correctly returned.
61
63 kill(2), sigaction(2), signal(2), sigprocmask(2), sigsuspend(2), sigse‐
64 tops(3), signal(7)
65
67 This page is part of release 5.07 of the Linux man-pages project. A
68 description of the project, information about reporting bugs, and the
69 latest version of this page, can be found at
70 https://www.kernel.org/doc/man-pages/.
71
72
73
74Linux 2017-09-15 SIGPENDING(2)