1psignal(3) Library Functions Manual psignal(3)
2
3
4
6 psignal, psiginfo - print signal description
7
9 Standard C library (libc, -lc)
10
12 #include <signal.h>
13
14 void psignal(int sig, const char *s);
15 void psiginfo(const siginfo_t *pinfo, const char *s);
16
17 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
18
19 psignal():
20 Since glibc 2.19:
21 _DEFAULT_SOURCE
22 glibc 2.19 and earlier:
23 _BSD_SOURCE || _SVID_SOURCE
24
25 psiginfo():
26 _POSIX_C_SOURCE >= 200809L
27
29 The psignal() function displays a message on stderr consisting of the
30 string s, a colon, a space, a string describing the signal number sig,
31 and a trailing newline. If the string s is NULL or empty, the colon
32 and space are omitted. If sig is invalid, the message displayed will
33 indicate an unknown signal.
34
35 The psiginfo() function is like psignal(), except that it displays in‐
36 formation about the signal described by pinfo, which should point to a
37 valid siginfo_t structure. As well as the signal description, psig‐
38 info() displays information about the origin of the signal, and other
39 information relevant to the signal (e.g., the relevant memory address
40 for hardware-generated signals, the child process ID for SIGCHLD, and
41 the user ID and process ID of the sender, for signals set using kill(2)
42 or sigqueue(3)).
43
45 The psignal() and psiginfo() functions return no value.
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.
59
61 glibc 2.10. POSIX.1-2008, 4.3BSD.
62
64 Up to glibc 2.12, psiginfo() had the following bugs:
65
66 • In some circumstances, a trailing newline is not printed.
67
68 • Additional details are not displayed for real-time signals.
69
71 sigaction(2), perror(3), strsignal(3), signal(7)
72
73
74
75Linux man-pages 6.04 2023-03-30 psignal(3)