1 .\" Copyright (c) 2005 Michael Kerrisk
2 .\" based on earlier work by faith@cs.unc.edu and
3 .\" Mike Battersby <mib@deakin.edu.au>
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
25 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
27 .TH SIGPENDING 2 2008-10-04 "Linux" "Linux Programmer's Manual"
29 sigpending \- examine pending signals
31 .B #include <signal.h>
33 .BI "int sigpending(sigset_t *" set );
36 Feature Test Macro Requirements for glibc (see
37 .BR feature_test_macros (7)):
42 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
47 returns the set of signals that are pending for delivery to the calling
48 thread (i.e., the signals which have been raised while blocked).
49 The mask of pending signals is returned in
53 returns 0 on success and \-1 on error.
58 points to memory which is not a valid part of the process address space.
64 for details on manipulating signal sets.
66 The set of signals that is pending for a thread
67 is the union of the set of signals that is pending for that thread
68 and the set of signals that is pending for the process as a whole; see
73 initially has an empty pending signal set;
74 the pending signal set is preserved across an
77 In versions of glibc up to and including 2.2.1,
78 there is a bug in the wrapper function for
80 which means that information about pending real-time signals
81 is not correctly returned.