1PSIGNAL(3)                 Linux Programmer's Manual                PSIGNAL(3)
2
3
4

NAME

6       psignal, psiginfo - print signal description
7

SYNOPSIS

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       psiginfo(): _POSIX_C_SOURCE >= 200809L
22

DESCRIPTION

24       The  psignal()  function displays a message on stderr consisting of the
25       string s, a colon, a space, a string describing the signal number  sig,
26       and  a  trailing  newline.  If the string s is NULL or empty, the colon
27       and space are omitted.  If sig is invalid, the message  displayed  will
28       indicate an unknown signal.
29
30       The  psiginfo() function is like psignal(), except that it displays in‐
31       formation about the signal described by pinfo, which should point to  a
32       valid  siginfo_t  structure.   As well as the signal description, psig‐
33       info() displays information about the origin of the signal,  and  other
34       information  relevant  to the signal (e.g., the relevant memory address
35       for hardware-generated signals, the child process ID for  SIGCHLD,  and
36       the user ID and process ID of the sender, for signals set using kill(2)
37       or sigqueue(3)).
38

RETURN VALUE

40       The psignal() and psiginfo() functions return no value.
41

VERSIONS

43       The psiginfo() function was added to glibc in version 2.10.
44

ATTRIBUTES

46       For an  explanation  of  the  terms  used  in  this  section,  see  at‐
47       tributes(7).
48
49       ┌──────────────────────┬───────────────┬────────────────┐
50Interface             Attribute     Value          
51       ├──────────────────────┼───────────────┼────────────────┤
52psignal(), psiginfo() │ Thread safety │ MT-Safe locale │
53       └──────────────────────┴───────────────┴────────────────┘
54

CONFORMING TO

56       POSIX.1-2008, 4.3BSD.
57

BUGS

59       In glibc versions up to 2.12, psiginfo() had the following bugs:
60
61       *  In some circumstances, a trailing newline is not printed.
62
63       *  Additional details are not displayed for real-time signals.
64

SEE ALSO

66       sigaction(2), perror(3), strsignal(3), signal(7)
67

COLOPHON

69       This  page  is  part of release 5.10 of the Linux man-pages project.  A
70       description of the project, information about reporting bugs,  and  the
71       latest     version     of     this    page,    can    be    found    at
72       https://www.kernel.org/doc/man-pages/.
73
74
75
76GNU                               2020-11-01                        PSIGNAL(3)
Impressum