1 .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk)
2 .\" and Copyright (C) 2020 Michael Kerrisk <mtk.manpages@gmail.com>
4 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
6 .\" References consulted:
7 .\" Linux libc source code
8 .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991)
10 .\" Modified Sat Jul 24 17:59:03 1993 by Rik Faith (faith@cs.unc.edu)
11 .TH strsignal 3 (date) "Linux man-pages (unreleased)"
13 strsignal, sigabbrev_np, sigdescr_np, sys_siglist \-
14 return string describing signal
17 .RI ( libc ", " \-lc )
20 .B #include <string.h>
22 .BI "char *strsignal(int " sig );
23 .BI "const char *sigdescr_np(int " sig );
24 .BI "const char *sigabbrev_np(int " sig );
26 .BI "[[deprecated]] extern const char *const " sys_siglist [];
30 Feature Test Macro Requirements for glibc (see
31 .BR feature_test_macros (7)):
42 From glibc 2.10 to 2.31:
43 _POSIX_C_SOURCE >= 200809L
52 Glibc 2.19 and earlier:
58 function returns a string describing the signal
59 number passed in the argument
61 The string can be used only until the next call to
63 The string returned by
65 is localized according to the
67 category in the current locale.
71 function returns a string describing the signal
72 number passed in the argument
76 this string is not influenced by the current locale.
80 function returns the abbreviated name of the signal,
82 For example, given the value
84 it returns the string "INT".
86 The (deprecated) array
88 holds the signal description strings
89 indexed by signal number.
94 function should be used instead of this array; see also VERSIONS.
98 function returns the appropriate description
99 string, or an unknown signal message if the signal number is invalid.
100 On some systems (but not on Linux), NULL may instead be
101 returned for an invalid signal number.
107 functions return the appropriate description string.
108 The returned string is statically allocated and valid for
109 the lifetime of the program.
110 These functions return NULL for an invalid signal number.
115 first appeared in glibc 2.32.
117 Starting with version 2.32,
118 .\" glibc commit b1ccfc061feee9ce616444ded8e1cd5acf9fa97f
121 symbol is no longer exported by glibc.
123 For an explanation of the terms used in this section, see
131 Interface Attribute Value
135 MT-Unsafe race:strsignal locale
140 T} Thread safety MT-Safe
148 Present on Solaris and the BSDs.
156 is nonstandard, but present on many other systems.
161 are thread-safe and async-signal-safe.