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