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

psiginfo.3p (4316B)


  1. '\" et
  2. .TH PSIGINFO "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. psiginfo, psignal
  12. \(em write signal information to standard error
  13. .SH SYNOPSIS
  14. .LP
  15. .nf
  16. #include <signal.h>
  17. .P
  18. void psiginfo(const siginfo_t *\fIpinfo\fP, const char *\fImessage\fP);
  19. void psignal(int \fIsignum\fP, const char *\fImessage\fP);
  20. .fi
  21. .SH DESCRIPTION
  22. The
  23. \fIpsiginfo\fR()
  24. and
  25. \fIpsignal\fR()
  26. functions shall write a language-dependent message associated with a
  27. signal number to the standard error stream as follows:
  28. .IP " *" 4
  29. First, if
  30. .IR message
  31. is not a null pointer and is not the empty string, the string pointed
  32. to by the
  33. .IR message
  34. argument shall be written, followed by a
  35. <colon>
  36. and a
  37. <space>.
  38. .IP " *" 4
  39. Then the signal description string associated with
  40. .IR signum
  41. or with the signal indicated by
  42. .IR pinfo
  43. shall be written, followed by a
  44. <newline>.
  45. .P
  46. For
  47. \fIpsiginfo\fR(),
  48. the application shall ensure that the argument
  49. .IR pinfo
  50. references a valid
  51. .BR siginfo_t
  52. structure. For
  53. \fIpsignal\fR(),
  54. if
  55. .IR signum
  56. is not a valid signal number, the behavior is implementation-defined.
  57. .P
  58. The
  59. \fIpsiginfo\fR()
  60. and
  61. \fIpsignal\fR()
  62. functions shall not change the orientation of the standard error stream.
  63. .P
  64. The
  65. \fIpsiginfo\fR()
  66. and
  67. \fIpsignal\fR()
  68. functions shall mark for update the last data modification and last file
  69. status change timestamps of the file associated with the standard error
  70. stream at some time between their successful completion and
  71. \fIexit\fR(),
  72. \fIabort\fR(),
  73. or the completion of
  74. \fIfflush\fR()
  75. or
  76. \fIfclose\fR()
  77. on
  78. .IR stderr .
  79. .P
  80. The
  81. \fIpsiginfo\fR()
  82. and
  83. \fIpsignal\fR()
  84. functions shall not change the setting of
  85. .IR errno
  86. if successful.
  87. .P
  88. On error, the
  89. \fIpsiginfo\fR()
  90. and
  91. \fIpsignal\fR()
  92. functions shall set the error indicator for the stream to which
  93. .IR stderr
  94. points, and shall set
  95. .IR errno
  96. to indicate the error.
  97. .P
  98. Since no value is returned, an application wishing to check for error
  99. situations should set
  100. .IR errno
  101. to 0, then call
  102. \fIpsiginfo\fR()
  103. or
  104. \fIpsignal\fR(),
  105. then check
  106. .IR errno .
  107. .SH "RETURN VALUE"
  108. These functions shall not return a value.
  109. .SH ERRORS
  110. Refer to
  111. .IR "\fIfputc\fR\^(\|)".
  112. .LP
  113. .IR "The following sections are informative."
  114. .SH EXAMPLES
  115. None.
  116. .SH "APPLICATION USAGE"
  117. As an alternative to setting
  118. .IR errno
  119. to zero before the call and checking if it is non-zero afterwards,
  120. applications can use
  121. \fIferror\fR()
  122. to detect whether
  123. \fIpsiginfo\fR()
  124. or
  125. \fIpsignal\fR()
  126. encountered an error.
  127. .P
  128. An application wishing to use this method to check for error situations
  129. should call
  130. .IR clearerr ( stderr )
  131. before calling
  132. \fIpsiginfo\fR()
  133. or
  134. \fIpsignal\fR(),
  135. then if
  136. .IR ferror ( stderr )
  137. returns non-zero, the value of
  138. .IR errno
  139. indicates which error occurred.
  140. .SH RATIONALE
  141. System V historically has
  142. \fIpsignal\fR()
  143. and
  144. \fIpsiginfo\fR()
  145. in
  146. .IR <siginfo.h> .
  147. However, the
  148. .IR <siginfo.h>
  149. header is not specified in the Base Definitions volume of POSIX.1\(hy2017, and the type
  150. .BR siginfo_t
  151. is defined in
  152. .IR <signal.h> .
  153. .SH "FUTURE DIRECTIONS"
  154. None.
  155. .SH "SEE ALSO"
  156. .IR "\fIfputc\fR\^(\|)",
  157. .IR "\fIperror\fR\^(\|)",
  158. .IR "\fIstrsignal\fR\^(\|)"
  159. .P
  160. The Base Definitions volume of POSIX.1\(hy2017,
  161. .IR "\fB<signal.h>\fP"
  162. .\"
  163. .SH COPYRIGHT
  164. Portions of this text are reprinted and reproduced in electronic form
  165. from IEEE Std 1003.1-2017, Standard for Information Technology
  166. -- Portable Operating System Interface (POSIX), The Open Group Base
  167. Specifications Issue 7, 2018 Edition,
  168. Copyright (C) 2018 by the Institute of
  169. Electrical and Electronics Engineers, Inc and The Open Group.
  170. In the event of any discrepancy between this version and the original IEEE and
  171. The Open Group Standard, the original IEEE and The Open Group Standard
  172. is the referee document. The original Standard can be obtained online at
  173. http://www.opengroup.org/unix/online.html .
  174. .PP
  175. Any typographical or formatting errors that appear
  176. in this page are most likely
  177. to have been introduced during the conversion of the source files to
  178. man page format. To report such errors, see
  179. https://www.kernel.org/doc/man-pages/reporting_bugs.html .