]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/psignal.3
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man3 / psignal.3
CommitLineData
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 12psignal, psiginfo \- print signal description
44c2272c
AC
13.SH LIBRARY
14Standard 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
25Feature 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
42The
43.BR psignal ()
44function displays a message on \fIstderr\fP
58ac0956
GJ
45consisting of the string \fIs\fP, a colon, a space, a string
46describing the signal number \fIsig\fP, and a trailing newline.
47If the string \fIs\fP is NULL or empty, the colon and space are omitted.
1c44bd5b 48If \fIsig\fP is invalid,
fea681da 49the message displayed will indicate an unknown signal.
847e0d88 50.PP
58ac0956
GJ
51The
52.BR psiginfo ()
53function is like
54.BR psignal (),
55except that it displays information about the signal described by
56.IR pinfo ,
57which should point to a valid
58.I siginfo_t
59structure.
a2d58b15
MK
60As well as the signal description,
61.BR psiginfo ()
62displays information about the origin of the signal,
63and other information relevant to the signal
64(e.g., the relevant memory address for hardware-generated signals,
65the child process ID for
66.BR SIGCHLD ,
67and the user ID and process ID of the sender, for signals set using
68.BR kill (2)
69or
485ab701 70.BR sigqueue (3)).
47297adb 71.SH RETURN VALUE
60a90ecd
MK
72The
73.BR psignal ()
58ac0956
GJ
74and
75.BR psiginfo ()
76functions return no value.
a2d58b15
MK
77.SH VERSIONS
78The
b1e9ce70 79.BR psiginfo ()
a2d58b15 80function was added to glibc in version 2.10.
d71055db
ZL
81.SH ATTRIBUTES
82For 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
87allbox;
c466875e 88lbx lb lb
d71055db
ZL
89l l l.
90Interface Attribute Value
91T{
92.BR psignal (),
93.BR psiginfo ()
94T} Thread safety MT-Safe locale
95.TE
c466875e
MK
96.hy
97.ad
847e0d88 98.sp 1
3113c7f3 99.SH STANDARDS
2773008f 100POSIX.1-2008, 4.3BSD.
a2d58b15 101.SH BUGS
930e3731 102In glibc versions up to 2.12,
a2d58b15 103.BR psiginfo ()
930e3731 104had the following bugs:
a2d58b15
MK
105.IP * 3
106In 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 *
110Additional 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)