OSDN Git Service

LDP: Update original to LDP v3.79
[linuxjm/LDP_man-pages.git] / original / man3 / psignal.3
1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" References consulted:
26 .\"     Linux libc source code
27 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
28 .\"     386BSD man pages
29 .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu)
30 .TH PSIGNAL 3  2010-10-06 "GNU" "Linux Programmer's Manual"
31 .SH NAME
32 psignal, psiginfo \- print signal message
33 .SH SYNOPSIS
34 .nf
35 .B #include <signal.h>
36 .sp
37 .BI "void psignal(int " sig ", const char *" s );
38 .BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s );
39 .sp
40 .BI "extern const char *const " sys_siglist [];
41 .fi
42 .sp
43 .in -4n
44 Feature Test Macro Requirements for glibc (see
45 .BR feature_test_macros (7)):
46 .in
47 .sp
48 .BR psignal ():
49 _SVID_SOURCE || _BSD_SOURCE
50 .br
51 .BR psiginfo ():
52 _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L
53 .br
54 .IR sys_siglist :
55 _BSD_SOURCE
56 .SH DESCRIPTION
57 The
58 .BR psignal ()
59 function displays a message on \fIstderr\fP
60 consisting of the string \fIs\fP, a colon, a space, a string
61 describing the signal number \fIsig\fP, and a trailing newline.
62 If the string \fIs\fP is NULL or empty, the colon and space are omitted.
63 If \fIsig\fP is invalid,
64 the message displayed will indicate an unknown signal.
65
66 The
67 .BR psiginfo ()
68 function is like
69 .BR psignal (),
70 except that it displays information about the signal described by
71 .IR pinfo ,
72 which should point to a valid
73 .I siginfo_t
74 structure.
75 As well as the signal description,
76 .BR psiginfo ()
77 displays information about the origin of the signal,
78 and other information relevant to the signal
79 (e.g., the relevant memory address for hardware-generated signals,
80 the child process ID for
81 .BR SIGCHLD ,
82 and the user ID and process ID of the sender, for signals set using
83 .BR kill (2)
84 or
85 .BR sigqueue (3)).
86
87 The array \fIsys_siglist\fP holds the signal description strings
88 indexed by signal number.
89 .SH RETURN VALUE
90 The
91 .BR psignal ()
92 and
93 .BR psiginfo ()
94 functions return no value.
95 .SH VERSIONS
96 The
97 .BR psiginfo ()
98 function was added to glibc in version 2.10.
99 .SH CONFORMING TO
100 POSIX.1-2008, 4.3BSD.
101 .SH BUGS
102 In glibc versions up to 2.12,
103 .BR psiginfo ()
104 had the following bugs:
105 .IP * 3
106 In some circumstances, a trailing newline is not printed.
107 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
108 .\" Reportedly now fixed; check glibc 2.13
109 .IP *
110 Additional details are not displayed for real-time signals.
111 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
112 .\" Reportedly now fixed; check glibc 2.13
113 .SH SEE ALSO
114 .BR sigaction (2),
115 .BR perror (3),
116 .BR strsignal (3),
117 .BR signal (7)
118 .SH COLOPHON
119 This page is part of release 3.79 of the Linux
120 .I man-pages
121 project.
122 A description of the project,
123 information about reporting bugs,
124 and the latest version of this page,
125 can be found at
126 \%http://www.kernel.org/doc/man\-pages/.