PSIGINFO(3)                POSIX Programmer's Manual               PSIGINFO(3)



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


NNAAMMEE
       psiginfo, psignal -- print signal information to standard error

SSYYNNOOPPSSIISS
       #include <signal.h>

       void psiginfo(const siginfo_t *_p_i_n_f_o, const char *_m_e_s_s_a_g_e);
       void psignal(int _s_i_g_n_u_m, const char *_m_e_s_s_a_g_e);

DDEESSCCRRIIPPTTIIOONN
       The _p_s_i_g_i_n_f_o() and _p_s_i_g_n_a_l() functions shall print a message out on
       _s_t_d_e_r_r associated with a signal number. If _m_e_s_s_a_g_e is not null and is
       not the empty string, then the string pointed to by the _m_e_s_s_a_g_e
       argument shall be printed first, followed by a <colon>, a <space>, and
       the signal description string indicated by _s_i_g_n_u_m, or by the signal
       associated with _p_i_n_f_o.  If the _m_e_s_s_a_g_e argument is null or points to an
       empty string, then only the signal description shall be printed. For
       _p_s_i_g_i_n_f_o(), the argument _p_i_n_f_o references a valid ssiiggiinnffoo__tt structure.
       For _p_s_i_g_n_a_l(), if _s_i_g_n_u_m is not a valid signal number, the behavior is
       implementation-defined.

       The _p_s_i_g_i_n_f_o() and _p_s_i_g_n_a_l() functions shall not change the orientation
       of the standard error stream.

       The _p_s_i_g_i_n_f_o() and _p_s_i_g_n_a_l() functions shall mark for update the last
       data modification and last file status change timestamps of the file
       associated with the standard error stream at some time between their
       successful completion and _e_x_i_t(), _a_b_o_r_t(), or the completion of
       _f_f_l_u_s_h() or _f_c_l_o_s_e() on _s_t_d_e_r_r.

       The _p_s_i_g_i_n_f_o() and _p_s_i_g_n_a_l() functions shall not change the setting of
       _e_r_r_n_o if successful.

       On error, the _p_s_i_g_i_n_f_o() and _p_s_i_g_n_a_l() functions shall set the error
       indicator for the stream to which _s_t_d_e_r_r points, and shall set _e_r_r_n_o to
       indicate the error.

       Since no value is returned, an application wishing to check for error
       situations should set _e_r_r_n_o to 0, then call _p_s_i_g_i_n_f_o() or _p_s_i_g_n_a_l(),
       then check _e_r_r_n_o.

RREETTUURRNN VVAALLUUEE
       These functions shall not return a value.

EERRRROORRSS
       Refer to _f_p_u_t_c().

       _T_h_e _f_o_l_l_o_w_i_n_g _s_e_c_t_i_o_n_s _a_r_e _i_n_f_o_r_m_a_t_i_v_e_.

EEXXAAMMPPLLEESS
       None.

AAPPPPLLIICCAATTIIOONN UUSSAAGGEE
       As an alternative to setting _e_r_r_n_o to zero before the call and checking
       if it is non-zero afterwards, applications can use _f_e_r_r_o_r() to detect
       whether _p_s_i_g_i_n_f_o() or _p_s_i_g_n_a_l() encountered an error.

       An application wishing to use this method to check for error situations
       should call _c_l_e_a_r_e_r_r(_s_t_d_e_r_r) before calling _p_s_i_g_i_n_f_o() or _p_s_i_g_n_a_l(),
       then if _f_e_r_r_o_r(_s_t_d_e_r_r) returns non-zero, the value of _e_r_r_n_o indicates
       which error occurred.

RRAATTIIOONNAALLEE
       System V historically has _p_s_i_g_n_a_l() and _p_s_i_g_i_n_f_o() in _<_s_i_g_i_n_f_o_._h_>.
       However, the _<_s_i_g_i_n_f_o_._h_> header is not specified in the Base
       Definitions volume of POSIX.1-2008, and the type ssiiggiinnffoo__tt is defined
       in _<_s_i_g_n_a_l_._h_>.

FFUUTTUURREE DDIIRREECCTTIIOONNSS
       None.

SSEEEE AALLSSOO
       _f_p_u_t_c(), _p_e_r_r_o_r(), _s_t_r_s_i_g_n_a_l()

       The Base Definitions volume of POSIX.1-2008, <<ssiiggnnaall..hh>>

CCOOPPYYRRIIGGHHTT
       Portions of this text are reprinted and reproduced in electronic form
       from IEEE Std 1003.1, 2013 Edition, Standard for Information Technology
       -- Portable Operating System Interface (POSIX), The Open Group Base
       Specifications Issue 7, Copyright (C) 2013 by the Institute of
       Electrical and Electronics Engineers, Inc and The Open Group.  (This is
       POSIX.1-2008 with the 2013 Technical Corrigendum 1 applied.) In the
       event of any discrepancy between this version and the original IEEE and
       The Open Group Standard, the original IEEE and The Open Group Standard
       is the referee document. The original Standard can be obtained online
       at http://www.unix.org/online.html .

       Any typographical or formatting errors that appear in this page are
       most likely to have been introduced during the conversion of the source
       files to man page format. To report such errors, see
       https://www.kernel.org/doc/man-pages/reporting_bugs.html .



IEEE/The Open Group                  2013                          PSIGINFO(3)
