logo

oasis-root

Compiled tree of Oasis Linux based on own branch at <https://hacktivis.me/git/oasis/> git clone https://anongit.hacktivis.me/git/oasis-root.git

strsignal.3p (3163B)


  1. '\" et
  2. .TH STRSIGNAL "3P" 2017 "IEEE/The Open Group" "POSIX Programmer's Manual"
  3. .\"
  4. .SH PROLOG
  5. This manual page is part of the POSIX Programmer's Manual.
  6. The Linux implementation of this interface may differ (consult
  7. the corresponding Linux manual page for details of Linux behavior),
  8. or the interface may not be implemented on Linux.
  9. .\"
  10. .SH NAME
  11. strsignal
  12. \(em get name of signal
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <string.h>
  17. .P
  18. char *strsignal(int \fIsignum\fP);
  19. .fi
  20. .SH DESCRIPTION
  21. The
  22. \fIstrsignal\fR()
  23. function shall map the signal number in
  24. .IR signum
  25. to an implementation-defined string and shall return a pointer to it.
  26. It shall use the same set of messages as the
  27. \fIpsignal\fR()
  28. function.
  29. .P
  30. The application shall not modify the string returned. The returned
  31. pointer might be invalidated or the string content might be overwritten
  32. by a subsequent call to
  33. \fIstrsignal\fR()
  34. or
  35. \fIsetlocale\fR().
  36. The returned pointer might also be invalidated if the calling thread
  37. is terminated.
  38. .P
  39. The contents of the message strings returned by
  40. \fIstrsignal\fR()
  41. should be determined by the setting of the
  42. .IR LC_MESSAGES
  43. category in the current locale.
  44. .P
  45. The implementation shall behave as if no function defined in this
  46. standard calls
  47. \fIstrsignal\fR().
  48. .P
  49. Since no return value is reserved to indicate an error, an application
  50. wishing to check for error situations should set
  51. .IR errno
  52. to 0, then call
  53. \fIstrsignal\fR(),
  54. then check
  55. .IR errno .
  56. .P
  57. The
  58. \fIstrsignal\fR()
  59. function need not be thread-safe.
  60. .SH "RETURN VALUE"
  61. Upon successful completion,
  62. \fIstrsignal\fR()
  63. shall return a pointer to a string. Otherwise, if
  64. .IR signum
  65. is not a valid signal number, the return value is unspecified.
  66. .SH ERRORS
  67. No errors are defined.
  68. .LP
  69. .IR "The following sections are informative."
  70. .SH EXAMPLES
  71. None.
  72. .SH "APPLICATION USAGE"
  73. None.
  74. .SH RATIONALE
  75. If
  76. .IR signum
  77. is not a valid signal number, some implementations return NULL, while
  78. for others the
  79. \fIstrsignal\fR()
  80. function returns a pointer to a string containing an unspecified
  81. message denoting an unknown signal. POSIX.1\(hy2008 leaves this return
  82. value unspecified.
  83. .SH "FUTURE DIRECTIONS"
  84. None.
  85. .SH "SEE ALSO"
  86. .IR "\fIpsiginfo\fR\^(\|)",
  87. .IR "\fIsetlocale\fR\^(\|)"
  88. .P
  89. The Base Definitions volume of POSIX.1\(hy2017,
  90. .IR "\fB<string.h>\fP"
  91. .\"
  92. .SH COPYRIGHT
  93. Portions of this text are reprinted and reproduced in electronic form
  94. from IEEE Std 1003.1-2017, Standard for Information Technology
  95. -- Portable Operating System Interface (POSIX), The Open Group Base
  96. Specifications Issue 7, 2018 Edition,
  97. Copyright (C) 2018 by the Institute of
  98. Electrical and Electronics Engineers, Inc and The Open Group.
  99. In the event of any discrepancy between this version and the original IEEE and
  100. The Open Group Standard, the original IEEE and The Open Group Standard
  101. is the referee document. The original Standard can be obtained online at
  102. http://www.opengroup.org/unix/online.html .
  103. .PP
  104. Any typographical or formatting errors that appear
  105. in this page are most likely
  106. to have been introduced during the conversion of the source files to
  107. man page format. To report such errors, see
  108. https://www.kernel.org/doc/man-pages/reporting_bugs.html .