1STRSIGNAL(3P)              POSIX Programmer's Manual             STRSIGNAL(3P)
2
3
4

PROLOG

6       This  manual  page is part of the POSIX Programmer's Manual.  The Linux
7       implementation of this interface may differ (consult the  corresponding
8       Linux  manual page for details of Linux behavior), or the interface may
9       not be implemented on Linux.
10

NAME

12       strsignal — get name of signal
13

SYNOPSIS

15       #include <string.h>
16
17       char *strsignal(int signum);
18

DESCRIPTION

20       The strsignal() function shall map the signal number in  signum  to  an
21       implementation-defined  string  and  shall  return a pointer to it.  It
22       shall use the same set of messages as the psignal() function.
23
24       The application shall not modify  the  string  returned.  The  returned
25       pointer might be invalidated or the string content might be overwritten
26       by a subsequent call  to  strsignal()  or  setlocale().   The  returned
27       pointer might also be invalidated if the calling thread is terminated.
28
29       The  contents  of the message strings returned by strsignal() should be
30       determined by the setting of the LC_MESSAGES category  in  the  current
31       locale.
32
33       The implementation shall behave as if no function defined in this stan‐
34       dard calls strsignal().
35
36       Since no return value is reserved to indicate an error, an  application
37       wishing  to check for error situations should set errno to 0, then call
38       strsignal(), then check errno.
39
40       The strsignal() function need not be thread-safe.
41

RETURN VALUE

43       Upon successful completion, strsignal() shall return  a  pointer  to  a
44       string.  Otherwise,  if signum is not a valid signal number, the return
45       value is unspecified.
46

ERRORS

48       No errors are defined.
49
50       The following sections are informative.
51

EXAMPLES

53       None.
54

APPLICATION USAGE

56       None.
57

RATIONALE

59       If signum is not a valid signal  number,  some  implementations  return
60       NULL,  while for others the strsignal() function returns a pointer to a
61       string containing an unspecified message denoting  an  unknown  signal.
62       POSIX.1‐2008 leaves this return value unspecified.
63

FUTURE DIRECTIONS

65       None.
66

SEE ALSO

68       psiginfo(), setlocale()
69
70       The Base Definitions volume of POSIX.1‐2017, <string.h>
71
73       Portions  of  this text are reprinted and reproduced in electronic form
74       from IEEE Std 1003.1-2017, Standard for Information Technology --  Por‐
75       table  Operating System Interface (POSIX), The Open Group Base Specifi‐
76       cations Issue 7, 2018 Edition, Copyright (C) 2018 by the  Institute  of
77       Electrical  and  Electronics Engineers, Inc and The Open Group.  In the
78       event of any discrepancy between this version and the original IEEE and
79       The  Open Group Standard, the original IEEE and The Open Group Standard
80       is the referee document. The original Standard can be  obtained  online
81       at http://www.opengroup.org/unix/online.html .
82
83       Any  typographical  or  formatting  errors that appear in this page are
84       most likely to have been introduced during the conversion of the source
85       files  to  man page format. To report such errors, see https://www.ker
86       nel.org/doc/man-pages/reporting_bugs.html .
87
88
89
90IEEE/The Open Group                  2017                        STRSIGNAL(3P)
Impressum