1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright (C) 2020 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" %%%LICENSE_START(VERBATIM)
5 .\" Permission is granted to make and distribute verbatim copies of this
6 .\" manual provided the copyright notice and this permission notice are
7 .\" preserved on all copies.
9 .\" Permission is granted to copy and distribute modified versions of this
10 .\" manual under the conditions for verbatim copying, provided that the
11 .\" entire resulting derived work is distributed under the terms of a
12 .\" permission notice identical to this one.
14 .\" Since the Linux kernel and libraries are constantly changing, this
15 .\" manual page may be incorrect or out-of-date. The author(s) assume no
16 .\" responsibility for errors or omissions, or for damages resulting from
17 .\" the use of the information contained herein. The author(s) may not
18 .\" have taken the same level of care in the production of this manual,
19 .\" which is licensed free of charge, as they might when working
22 .\" Formatted or processed versions of this manual, if unaccompanied by
23 .\" the source, must acknowledge the copyright and authors of this work.
26 .\" References consulted:
27 .\" Linux libc source code
28 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
30 .\" Modified Sat Jul 24 17:59:03 1993 by Rik Faith (faith@cs.unc.edu)
31 .TH STRSIGNAL 3 2021-03-22 "GNU" "Linux Programmer's Manual"
33 strsignal, sigdescr_np, sigdescr_np, sys_siglist \- return string describing signal
36 .B #include <string.h>
38 .BI "char *strsignal(int " sig );
39 .BI "const char *sigdescr_np(int " sig );
40 .BI "const char *sigabbrev_np(int " sig );
42 .BI "extern const char *const " sys_siglist [];
46 Feature Test Macro Requirements for glibc (see
47 .BR feature_test_macros (7)):
58 From glibc 2.10 to 2.31:
59 _POSIX_C_SOURCE >= 200809L
68 Glibc 2.19 and earlier:
74 function returns a string describing the signal
75 number passed in the argument
77 The string can be used only until the next call to
79 The string returned by
81 is localized according to the
83 category in the current locale.
87 function returns a string describing the signal
88 number passed in the argument
92 this string is not influenced by the current locale.
96 function returns the abbreviated name of the signal,
98 For example, given the value
100 it returns the string "INT".
102 The (deprecated) array
104 holds the signal description strings
105 indexed by signal number.
110 function should be used instead of this array; see also VERSIONS.
114 function returns the appropriate description
115 string, or an unknown signal message if the signal number is invalid.
116 On some systems (but not on Linux), NULL may instead be
117 returned for an invalid signal number.
123 functions return the appropriate description string.
124 The returned string is statically allocated and valid for
125 the lifetime of the program.
126 These functions return NULL for an invalid signal number.
131 first appeared in glibc 2.32.
133 Starting with version 2.32,
134 .\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
137 symbol is no longer exported by glibc.
139 For an explanation of the terms used in this section, see
147 Interface Attribute Value
151 MT-Unsafe race:strsignal locale
156 T} Thread safety MT-Safe
164 Present on Solaris and the BSDs.
172 is nonstandard, but present on many other systems.
177 are thread-safe and async-signal-safe.