]>
Commit | Line | Data |
---|---|---|
fea681da MK |
1 | .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) |
2 | .\" | |
3 | .\" Permission is granted to make and distribute verbatim copies of this | |
4 | .\" manual provided the copyright notice and this permission notice are | |
5 | .\" preserved on all copies. | |
6 | .\" | |
7 | .\" Permission is granted to copy and distribute modified versions of this | |
8 | .\" manual under the conditions for verbatim copying, provided that the | |
9 | .\" entire resulting derived work is distributed under the terms of a | |
10 | .\" permission notice identical to this one. | |
c13182ef | 11 | .\" |
fea681da MK |
12 | .\" Since the Linux kernel and libraries are constantly changing, this |
13 | .\" manual page may be incorrect or out-of-date. The author(s) assume no | |
14 | .\" responsibility for errors or omissions, or for damages resulting from | |
15 | .\" the use of the information contained herein. The author(s) may not | |
16 | .\" have taken the same level of care in the production of this manual, | |
17 | .\" which is licensed free of charge, as they might when working | |
18 | .\" professionally. | |
c13182ef | 19 | .\" |
fea681da MK |
20 | .\" Formatted or processed versions of this manual, if unaccompanied by |
21 | .\" the source, must acknowledge the copyright and authors of this work. | |
22 | .\" | |
23 | .\" References consulted: | |
24 | .\" Linux libc source code | |
25 | .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) | |
26 | .\" 386BSD man pages | |
27 | .\" Modified Sat Jul 24 18:45:17 1993 by Rik Faith (faith@cs.unc.edu) | |
58ac0956 | 28 | .TH PSIGNAL 3 2010-10-06 "GNU" "Linux Programmer's Manual" |
fea681da | 29 | .SH NAME |
58ac0956 | 30 | psignal, psiginfo \- print signal message |
fea681da MK |
31 | .SH SYNOPSIS |
32 | .nf | |
33 | .B #include <signal.h> | |
34 | .sp | |
35 | .BI "void psignal(int " sig ", const char *" s ); | |
58ac0956 | 36 | .BI "void psiginfo(const siginfo_t *" pinfo ", const char *" s ); |
fea681da MK |
37 | .sp |
38 | .BI "extern const char *const " sys_siglist []; | |
39 | .fi | |
cc4615cc MK |
40 | .sp |
41 | .in -4n | |
42 | Feature Test Macro Requirements for glibc (see | |
43 | .BR feature_test_macros (7)): | |
44 | .in | |
45 | .sp | |
46 | .BR psignal (): | |
47 | _SVID_SOURCE || _BSD_SOURCE | |
48 | .br | |
58ac0956 GJ |
49 | .BR psiginfo (): |
50 | _XOPEN_SOURCE\ >=\ 700 || _POSIX_C_SOURCE\ >=\ 200809L | |
51 | .br | |
cc4615cc MK |
52 | .IR sys_siglist : |
53 | _BSD_SOURCE | |
fea681da | 54 | .SH DESCRIPTION |
60a90ecd MK |
55 | The |
56 | .BR psignal () | |
57 | function displays a message on \fIstderr\fP | |
58ac0956 GJ |
58 | consisting of the string \fIs\fP, a colon, a space, a string |
59 | describing the signal number \fIsig\fP, and a trailing newline. | |
60 | If the string \fIs\fP is NULL or empty, the colon and space are omitted. | |
1c44bd5b | 61 | If \fIsig\fP is invalid, |
fea681da | 62 | the message displayed will indicate an unknown signal. |
58ac0956 GJ |
63 | |
64 | The | |
65 | .BR psiginfo () | |
66 | function is like | |
67 | .BR psignal (), | |
68 | except that it displays information about the signal described by | |
69 | .IR pinfo , | |
70 | which should point to a valid | |
71 | .I siginfo_t | |
72 | structure. | |
a2d58b15 MK |
73 | As well as the signal description, |
74 | .BR psiginfo () | |
75 | displays information about the origin of the signal, | |
76 | and other information relevant to the signal | |
77 | (e.g., the relevant memory address for hardware-generated signals, | |
78 | the child process ID for | |
79 | .BR SIGCHLD , | |
80 | and the user ID and process ID of the sender, for signals set using | |
81 | .BR kill (2) | |
82 | or | |
83 | .BR sigqueue (2)). | |
58ac0956 | 84 | |
fea681da MK |
85 | The array \fIsys_siglist\fP holds the signal description strings |
86 | indexed by signal number. | |
87 | .SH "RETURN VALUE" | |
60a90ecd MK |
88 | The |
89 | .BR psignal () | |
58ac0956 GJ |
90 | and |
91 | .BR psiginfo () | |
92 | functions return no value. | |
a2d58b15 MK |
93 | .SH VERSIONS |
94 | The | |
95 | .BR psiginfo() | |
96 | function was added to glibc in version 2.10. | |
fea681da | 97 | .SH "CONFORMING TO" |
2773008f | 98 | POSIX.1-2008, 4.3BSD. |
a2d58b15 MK |
99 | .SH BUGS |
100 | As at glibc 2.12, | |
101 | .BR psiginfo () | |
102 | has the following bugs: | |
103 | .IP * 3 | |
104 | In some circumstances, a trailing newline is not printed. | |
105 | .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107 | |
106 | .IP * | |
107 | Additional details are not displayed for real-time signals. | |
108 | .\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108 | |
fea681da | 109 | .SH "SEE ALSO" |
0de14770 | 110 | .BR sigaction (2), |
fea681da | 111 | .BR perror (3), |
0de14770 MK |
112 | .BR strsignal (3), |
113 | .BR signal (7) |