1 .\" Copyright (c) 1983, 1991, 1993
2 .\" The Regents of the University of California. All rights reserved.
4 .\" Redistribution and use in source and binary forms, with or without
5 .\" modification, are permitted provided that the following conditions
7 .\" 1. Redistributions of source code must retain the above copyright
8 .\" notice, this list of conditions and the following disclaimer.
9 .\" 2. Redistributions in binary form must reproduce the above copyright
10 .\" notice, this list of conditions and the following disclaimer in the
11 .\" documentation and/or other materials provided with the distribution.
12 .\" 3. All advertising materials mentioning features or use of this software
13 .\" must display the following acknowledgement:
14 .\" This product includes software developed by the University of
15 .\" California, Berkeley and its contributors.
16 .\" 4. Neither the name of the University nor the names of its contributors
17 .\" may be used to endorse or promote products derived from this software
18 .\" without specific prior written permission.
20 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
21 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
23 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
24 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
26 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
27 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
28 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
29 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 .\" @(#)psignal.3 8.2 (Berkeley) 2/27/95
33 .\" $FreeBSD: src/lib/libc/gen/psignal.3,v 1.10.2.5 2003/03/15 15:11:05 trhodes Exp $
34 .\" $DragonFly: src/lib/libc/gen/psignal.3,v 1.3 2003/10/14 23:13:05 dillon Exp $
45 .Nd system signal messages
51 .Fn psignal "unsigned sig" "const char *s"
52 .Vt extern const char * const sys_siglist[] ;
53 .Vt extern const char * const sys_signame[] ;
54 .Vt extern const int sys_nsig ;
57 .Fn strsignal "int sig"
63 functions locate the descriptive message
64 string for a signal number.
68 function accepts a signal number argument
70 and returns a pointer to the corresponding message string.
74 function accepts a signal number argument
76 and writes it to the standard error.
81 and does not point to the null character,
83 is written to the standard error file descriptor
84 prior to the message string,
85 immediately followed by a colon and a space.
86 If the signal number is not recognized
92 The message strings can be accessed directly
93 through the external array
95 indexed by recognized signal numbers.
99 contains short, lower-case abbreviations for signals
100 which are useful for recognizing signal names
102 The external variable
104 contains a count of the strings in
108 Note that the defined variable
110 will typically be the same as
112 but might be different due to newer or older kernels and newer or
113 older libc libraries. For maximum portability you must use
115 to limit-check the above arrays. Additionally, you should check
118 array entries and generate a generic signal name in those cases.