siginfo(5) UNIX System V siginfo(5)
NAME
siginfo - signal generation information
SYNOPSIS
#include <siginfo.h>
DESCRIPTION
If a process is catching a signal, it may request information that tells
why the system generated that signal [see sigaction(2)]. If a process is
monitoring its children, it may receive information that tells why a
child changed state [see waitid(2)]. In either case, the system returns
the information in a structure of type siginfot, which includes the
following information:
int sisigno /* signal number */
int sierrno /* error number */
int sicode /* signal code */
sisigno contains the system-generated signal number. (For the waitid(2)
function, sisigno is always SIGCHLD.)
If sierrno is non-zero, it contains an error number associated with this
signal, as defined in errno.h.
sicode contains a code identifying the cause of the signal. If the
value of sicode is less than or equal to 0, then the signal was
generated by a user process [see kill(2) and sigsend(2)] and the siginfo
structure contains the following additional information:
pidt sipid /* sending process ID */
uidt siuid /* sending user ID */
Otherwise, sicode contains a signal-specific reason why the signal was
generated, as follows:
Signal Code Reason
_______________________________________________________________
SIGILL ILLILLOPC illegal opcode
ILLILLOPN illegal operand
ILLILLADR illegal addressing mode
ILLILLTRP illegal trap
ILLPRVOPC privileged opcode
ILLPRVREG privileged register
ILLCOPROC coprocessor error
ILLBADSTK internal stack error
_______________________________________________________________
SIGFPE FPEINTDIV integer divide by zero
FPEINTOVF integer overflow
FPEFLTDIV floating point divide by zero
FPEFLTOVF floating point overflow
FPEFLTUND floating point underflow
FPEFLTRES floating point inexact result
10/89 Page 1
siginfo(5) UNIX System V siginfo(5)
Signal Code Reason
_______________________________________________________________
FPEFLTINV invalid floating point operation
FPEFLTSUB subscript out of range
SIGSEGV SEGVMAPERR address not mapped to object
SEGVACCERR invalid permissions for mapped object
_______________________________________________________________
SIGBUS BUSADRALN invalid address alignment
BUSADRERR non-existent physical address
BUSOBJERR object specific hardware error
_______________________________________________________________
SIGTRAP TRAPBRKPT process breakpoint
TRAPTRACE process trace trap
_______________________________________________________________
SIGCHLD CLDEXITED child has exited
CLDKILLED child was killed
CLDDUMPED child terminated abnormally
CLDTRAPPED traced child has trapped
CLDSTOPPED child has stopped
CLDCONTINUED stopped child had continued
_______________________________________________________________
SIGPOLL POLLIN data input available
POLLOUT output buffers available
POLLMSG input message available
POLLERR I/O error
POLLPRI high priority input available
POLLHUP device disconnected
In addition, the following signal-dependent information is available for
kernel-generated signals:
Signal Field Value
________________________________________________________________
SIGILL caddrt siaddr address of faulting instruction
SIGFPE
________________________________________________________________
SIGSEGV caddrt siaddr address of faulting memory reference
SIGBUS
________________________________________________________________
SIGCHLD pidt sipid child process ID
int sistatus exit value or signal
________________________________________________________________
SIGPOLL long siband band event for POLLIN, POLLOUT, or
POLLMSG
SEE ALSO
sigaction(2), waitid(2), signal(5)
NOTES
For SIGCHLD signals, if sicode is equal to CLDEXITED, then sistatus is
Page 2 10/89
siginfo(5) UNIX System V siginfo(5)
equal to the exit value of the process; otherwise, it is equal to the
signal that caused the process to change state. For some
implementations, the exact value of siaddr may not be available; in that
case, siaddr is guaranteed to be on the same page as the faulting
instruction or memory reference.
10/89 Page 3