1PSIGNAL(3) Linux Programmer's Manual PSIGNAL(3)
2
3
4
6 psignal, psiginfo - print signal description
7
9 #include <signal.h>
10
11 void psignal(int sig, const char *s);
12 void psiginfo(const siginfo_t *pinfo, const char *s);
13
14 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
15
16 psignal():
17 Since glibc 2.19:
18 _DEFAULT_SOURCE
19 Glibc 2.19 and earlier:
20 _BSD_SOURCE || _SVID_SOURCE
21
22 psiginfo():
23 _POSIX_C_SOURCE >= 200809L
24
26 The psignal() function displays a message on stderr consisting of the
27 string s, a colon, a space, a string describing the signal number sig,
28 and a trailing newline. If the string s is NULL or empty, the colon
29 and space are omitted. If sig is invalid, the message displayed will
30 indicate an unknown signal.
31
32 The psiginfo() function is like psignal(), except that it displays in‐
33 formation about the signal described by pinfo, which should point to a
34 valid siginfo_t structure. As well as the signal description, psig‐
35 info() displays information about the origin of the signal, and other
36 information relevant to the signal (e.g., the relevant memory address
37 for hardware-generated signals, the child process ID for SIGCHLD, and
38 the user ID and process ID of the sender, for signals set using kill(2)
39 or sigqueue(3)).
40
42 The psignal() and psiginfo() functions return no value.
43
45 The psiginfo() function was added to glibc in version 2.10.
46
48 For an explanation of the terms used in this section, see at‐
49 tributes(7).
50
51 ┌─────────────────────────────────────┬───────────────┬────────────────┐
52 │Interface │ Attribute │ Value │
53 ├─────────────────────────────────────┼───────────────┼────────────────┤
54 │psignal(), psiginfo() │ Thread safety │ MT-Safe locale │
55 └─────────────────────────────────────┴───────────────┴────────────────┘
56
58 POSIX.1-2008, 4.3BSD.
59
61 In glibc versions up to 2.12, psiginfo() had the following bugs:
62
63 * In some circumstances, a trailing newline is not printed.
64
65 * Additional details are not displayed for real-time signals.
66
68 sigaction(2), perror(3), strsignal(3), signal(7)
69
71 This page is part of release 5.13 of the Linux man-pages project. A
72 description of the project, information about reporting bugs, and the
73 latest version of this page, can be found at
74 https://www.kernel.org/doc/man-pages/.
75
76
77
78GNU 2021-03-22 PSIGNAL(3)