README: Update links
[man-pages.git] / man3 / psignal.3
blob583c532d3ff7aecf5e24961cc27f52cd927ba44e
1 '\" t
2 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
3 .\"
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
5 .\"
6 .\" References consulted:
7 .\"     Linux libc source code
8 .\"     Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
9 .\"     386BSD man pages
10 .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu)
11 .TH psignal 3 (date) "Linux man-pages (unreleased)"
12 .SH NAME
13 psignal, psiginfo \- print signal description
14 .SH LIBRARY
15 Standard C library
16 .RI ( libc ", " \-lc )
17 .SH SYNOPSIS
18 .nf
19 .B #include <signal.h>
21 .BI "void psignal(int " sig ", const char *" s );
22 .BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s );
23 .fi
25 .RS -4
26 Feature Test Macro Requirements for glibc (see
27 .BR feature_test_macros (7)):
28 .RE
30 .BR psignal ():
31 .nf
32     Since glibc 2.19:
33             _DEFAULT_SOURCE
34     glibc 2.19 and earlier:
35         _BSD_SOURCE || _SVID_SOURCE
36 .fi
38 .BR psiginfo ():
39 .nf
40     _POSIX_C_SOURCE >= 200809L
41 .fi
42 .SH DESCRIPTION
43 The
44 .BR psignal ()
45 function displays a message on \fIstderr\fP
46 consisting of the string \fIs\fP, a colon, a space, a string
47 describing the signal number \fIsig\fP, and a trailing newline.
48 If the string \fIs\fP is NULL or empty, the colon and space are omitted.
49 If \fIsig\fP is invalid,
50 the message displayed will indicate an unknown signal.
52 The
53 .BR psiginfo ()
54 function is like
55 .BR psignal (),
56 except that it displays information about the signal described by
57 .IR pinfo ,
58 which should point to a valid
59 .I siginfo_t
60 structure.
61 As well as the signal description,
62 .BR psiginfo ()
63 displays information about the origin of the signal,
64 and other information relevant to the signal
65 (e.g., the relevant memory address for hardware-generated signals,
66 the child process ID for
67 .BR SIGCHLD ,
68 and the user ID and process ID of the sender, for signals set using
69 .BR kill (2)
71 .BR sigqueue (3)).
72 .SH RETURN VALUE
73 The
74 .BR psignal ()
75 and
76 .BR psiginfo ()
77 functions return no value.
78 .SH ATTRIBUTES
79 For an explanation of the terms used in this section, see
80 .BR attributes (7).
81 .TS
82 allbox;
83 lbx lb lb
84 l l l.
85 Interface       Attribute       Value
87 .na
88 .nh
89 .BR psignal (),
90 .BR psiginfo ()
91 T}      Thread safety   MT-Safe locale
92 .TE
93 .SH STANDARDS
94 POSIX.1-2008.
95 .SH HISTORY
96 glibc 2.10.
97 POSIX.1-2008, 4.3BSD.
98 .SH BUGS
99 Up to glibc 2.12,
100 .BR psiginfo ()
101 had the following bugs:
102 .IP \[bu] 3
103 In some circumstances, a trailing newline is not printed.
104 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12107
105 .\" Reportedly now fixed; check glibc 2.13
106 .IP \[bu]
107 Additional details are not displayed for real-time signals.
108 .\" FIXME . http://sourceware.org/bugzilla/show_bug.cgi?id=12108
109 .\" Reportedly now fixed; check glibc 2.13
110 .SH SEE ALSO
111 .BR sigaction (2),
112 .BR perror (3),
113 .BR strsignal (3),
114 .BR signal (7)