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