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