OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / LDP_man-pages / original / man2 / sigpending.2
1 .\" Copyright (c) 2005 Michael Kerrisk
2 .\" based on earlier work by faith@cs.unc.edu and
3 .\" Mike Battersby <mib@deakin.edu.au>
4 .\"
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.
8 .\"
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.
13 .\"
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
20 .\" professionally.
21 .\"
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
24 .\"
25 .\" 2005-09-15, mtk, Created new page by splitting off from sigaction.2
26 .\"
27 .TH SIGPENDING 2 2008-10-04 "Linux" "Linux Programmer's Manual"
28 .SH NAME
29 sigpending \- examine pending signals
30 .SH SYNOPSIS
31 .B #include <signal.h>
32 .sp
33 .BI "int sigpending(sigset_t *" set );
34 .sp
35 .in -4n
36 Feature Test Macro Requirements for glibc (see
37 .BR feature_test_macros (7)):
38 .in
39 .sp
40 .ad l
41 .BR sigpending ():
42 _POSIX_C_SOURCE\ >=\ 1 || _XOPEN_SOURCE || _POSIX_SOURCE
43 .ad b
44 .SH DESCRIPTION
45 .PP
46 .BR sigpending ()
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
50 .IR set .
51 .SH "RETURN VALUE"
52 .BR sigpending ()
53 returns 0 on success and \-1 on error.
54 .SH ERRORS
55 .TP
56 .B EFAULT
57 .I set
58 points to memory which is not a valid part of the process address space.
59 .SH "CONFORMING TO"
60 POSIX.1-2001.
61 .SH NOTES
62 See
63 .BR sigsetops (3)
64 for details on manipulating signal sets.
65
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
69 .BR signal (7).
70
71 A child created via
72 .BR fork (2)
73 initially has an empty pending signal set;
74 the pending signal set is preserved across an
75 .BR execve (2).
76 .SH BUGS
77 In versions of glibc up to and including 2.2.1,
78 there is a bug in the wrapper function for
79 .BR sigpending ()
80 which means that information about pending real-time signals
81 is not correctly returned.
82 .SH "SEE ALSO"
83 .BR kill (2),
84 .BR sigaction (2),
85 .BR signal (2),
86 .BR sigprocmask (2),
87 .BR sigsuspend (2),
88 .BR sigsetops (3),
89 .BR signal (7)