]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man3/psignal.3
Various pages: Formatting fix
[thirdparty/man-pages.git] / 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 2020-11-01 "GNU" "Linux Programmer's Manual"
31 .SH NAME
32 psignal, psiginfo \- print signal description
33 .SH SYNOPSIS
34 .nf
35 .B #include <signal.h>
36 .PP
37 .BI "void psignal(int " sig ", const char *" s );
38 .BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s );
39 .fi
40 .PP
41 .RS -4
42 Feature Test Macro Requirements for glibc (see
43 .BR feature_test_macros (7)):
44 .RE
45 .PP
46 .BR psignal ():
47 Since glibc 2.19:
48 _DEFAULT_SOURCE
49 Glibc 2.19 and earlier:
50 _BSD_SOURCE || _SVID_SOURCE
51 .PP
52 .BR psiginfo ():
53 _POSIX_C_SOURCE\ >=\ 200809L
54 .SH DESCRIPTION
55 The
56 .BR psignal ()
57 function displays a message on \fIstderr\fP
58 consisting of the string \fIs\fP, a colon, a space, a string
59 describing the signal number \fIsig\fP, and a trailing newline.
60 If the string \fIs\fP is NULL or empty, the colon and space are omitted.
61 If \fIsig\fP is invalid,
62 the message displayed will indicate an unknown signal.
63 .PP
64 The
65 .BR psiginfo ()
66 function is like
67 .BR psignal (),
68 except that it displays information about the signal described by
69 .IR pinfo ,
70 which should point to a valid
71 .I siginfo_t
72 structure.
73 As well as the signal description,
74 .BR psiginfo ()
75 displays information about the origin of the signal,
76 and other information relevant to the signal
77 (e.g., the relevant memory address for hardware-generated signals,
78 the child process ID for
79 .BR SIGCHLD ,
80 and the user ID and process ID of the sender, for signals set using
81 .BR kill (2)
82 or
83 .BR sigqueue (3)).
84 .SH RETURN VALUE
85 The
86 .BR psignal ()
87 and
88 .BR psiginfo ()
89 functions return no value.
90 .SH VERSIONS
91 The
92 .BR psiginfo ()
93 function was added to glibc in version 2.10.
94 .SH ATTRIBUTES
95 For an explanation of the terms used in this section, see
96 .BR attributes (7).
97 .TS
98 allbox;
99 lbw21 lb lb
100 l l l.
101 Interface Attribute Value
102 T{
103 .BR psignal (),
104 .BR psiginfo ()
105 T} Thread safety MT-Safe locale
106 .TE
107 .sp 1
108 .SH CONFORMING TO
109 POSIX.1-2008, 4.3BSD.
110 .SH BUGS
111 In glibc versions up to 2.12,
112 .BR psiginfo ()
113 had the following bugs:
114 .IP * 3
115 In some circumstances, a trailing newline is not printed.
116 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
117 .\" Reportedly now fixed; check glibc 2.13
118 .IP *
119 Additional details are not displayed for real-time signals.
120 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
121 .\" Reportedly now fixed; check glibc 2.13
122 .SH SEE ALSO
123 .BR sigaction (2),
124 .BR perror (3),
125 .BR strsignal (3),
126 .BR signal (7)