]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man3/psignal.3
syscalls.2: srcfix: remove unneeded comments
[thirdparty/man-pages.git] / man3 / psignal.3
CommitLineData
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 30psignal, 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
42Feature 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
55The
56.BR psignal ()
57function displays a message on \fIstderr\fP
58ac0956
GJ
58consisting of the string \fIs\fP, a colon, a space, a string
59describing the signal number \fIsig\fP, and a trailing newline.
60If the string \fIs\fP is NULL or empty, the colon and space are omitted.
1c44bd5b 61If \fIsig\fP is invalid,
fea681da 62the message displayed will indicate an unknown signal.
58ac0956
GJ
63
64The
65.BR psiginfo ()
66function is like
67.BR psignal (),
68except that it displays information about the signal described by
69.IR pinfo ,
70which should point to a valid
71.I siginfo_t
72structure.
a2d58b15
MK
73As well as the signal description,
74.BR psiginfo ()
75displays information about the origin of the signal,
76and other information relevant to the signal
77(e.g., the relevant memory address for hardware-generated signals,
78the child process ID for
79.BR SIGCHLD ,
80and the user ID and process ID of the sender, for signals set using
81.BR kill (2)
82or
83.BR sigqueue (2)).
58ac0956 84
fea681da
MK
85The array \fIsys_siglist\fP holds the signal description strings
86indexed by signal number.
87.SH "RETURN VALUE"
60a90ecd
MK
88The
89.BR psignal ()
58ac0956
GJ
90and
91.BR psiginfo ()
92functions return no value.
a2d58b15
MK
93.SH VERSIONS
94The
b1e9ce70 95.BR psiginfo ()
a2d58b15 96function was added to glibc in version 2.10.
fea681da 97.SH "CONFORMING TO"
2773008f 98POSIX.1-2008, 4.3BSD.
a2d58b15 99.SH BUGS
930e3731 100In glibc versions up to 2.12,
a2d58b15 101.BR psiginfo ()
930e3731 102had the following bugs:
a2d58b15
MK
103.IP * 3
104In some circumstances, a trailing newline is not printed.
105.\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12107
930e3731 106.\" Reportedly now fixed; check glibc 2.13
a2d58b15
MK
107.IP *
108Additional details are not displayed for real-time signals.
109.\" FIXME http://sourceware.org/bugzilla/show_bug.cgi?id=12108
930e3731 110.\" Reportedly now fixed; check glibc 2.13
fea681da 111.SH "SEE ALSO"
0de14770 112.BR sigaction (2),
fea681da 113.BR perror (3),
0de14770
MK
114.BR strsignal (3),
115.BR signal (7)