1PSIGINFO(3P)               POSIX Programmer's Manual              PSIGINFO(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       psiginfo, psignal — write signal information to standard error
13

SYNOPSIS

15       #include <signal.h>
16
17       void psiginfo(const siginfo_t *pinfo, const char *message);
18       void psignal(int signum, const char *message);
19

DESCRIPTION

21       The psiginfo() and psignal() functions shall write a language-dependent
22       message associated with a signal number to the standard error stream as
23       follows:
24
25        *  First, if message is not a  null  pointer  and  is  not  the  empty
26           string,  the  string  pointed  to  by the message argument shall be
27           written, followed by a <colon> and a <space>.
28
29        *  Then the signal description string associated with signum  or  with
30           the signal indicated by pinfo shall be written, followed by a <new‐
31           line>.
32
33       For psiginfo(), the application shall ensure that  the  argument  pinfo
34       references a valid siginfo_t structure. For psignal(), if signum is not
35       a valid signal number, the behavior is implementation-defined.
36
37       The psiginfo() and psignal() functions shall not change the orientation
38       of the standard error stream.
39
40       The  psiginfo()  and psignal() functions shall mark for update the last
41       data modification and last file status change timestamps  of  the  file
42       associated  with  the  standard error stream at some time between their
43       successful  completion  and  exit(),  abort(),  or  the  completion  of
44       fflush() or fclose() on stderr.
45
46       The  psiginfo() and psignal() functions shall not change the setting of
47       errno if successful.
48
49       On error, the psiginfo() and psignal() functions shall  set  the  error
50       indicator for the stream to which stderr points, and shall set errno to
51       indicate the error.
52
53       Since no value is returned, an application wishing to check  for  error
54       situations  should  set  errno to 0, then call psiginfo() or psignal(),
55       then check errno.
56

RETURN VALUE

58       These functions shall not return a value.
59

ERRORS

61       Refer to fputc().
62
63       The following sections are informative.
64

EXAMPLES

66       None.
67

APPLICATION USAGE

69       As an alternative to setting errno to zero before the call and checking
70       if  it  is non-zero afterwards, applications can use ferror() to detect
71       whether psiginfo() or psignal() encountered an error.
72
73       An application wishing to use this method to check for error situations
74       should  call  clearerr(stderr)  before calling psiginfo() or psignal(),
75       then if ferror(stderr) returns non-zero, the value of  errno  indicates
76       which error occurred.
77

RATIONALE

79       System  V  historically  has  psignal()  and psiginfo() in <siginfo.h>.
80       However, the <siginfo.h> header is not specified in  the  Base  Defini‐
81       tions  volume  of  POSIX.1‐2017,  and  the type siginfo_t is defined in
82       <signal.h>.
83

FUTURE DIRECTIONS

85       None.
86

SEE ALSO

88       fputc(), perror(), strsignal()
89
90       The Base Definitions volume of POSIX.1‐2017, <signal.h>
91
93       Portions of this text are reprinted and reproduced in  electronic  form
94       from  IEEE Std 1003.1-2017, Standard for Information Technology -- Por‐
95       table Operating System Interface (POSIX), The Open Group Base  Specifi‐
96       cations  Issue  7, 2018 Edition, Copyright (C) 2018 by the Institute of
97       Electrical and Electronics Engineers, Inc and The Open Group.   In  the
98       event of any discrepancy between this version and the original IEEE and
99       The Open Group Standard, the original IEEE and The Open Group  Standard
100       is  the  referee document. The original Standard can be obtained online
101       at http://www.opengroup.org/unix/online.html .
102
103       Any typographical or formatting errors that appear  in  this  page  are
104       most likely to have been introduced during the conversion of the source
105       files to man page format. To report such errors,  see  https://www.ker
106       nel.org/doc/man-pages/reporting_bugs.html .
107
108
109
110IEEE/The Open Group                  2017                         PSIGINFO(3P)
Impressum