SIGINFO(5-SVR4) RISC/os Reference Manual SIGINFO(5-SVR4)
NAME
siginfo - signal generation information
SYNOPSIS
#include <siginfo.h>
DESCRIPTION
If a process is catching a signal, it may request informa-
tion 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 si_signo /* signal number */
int si_errno /* error number */
int si_code /* 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 associ-
ated 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 sig-
send(2)] and the siginfo structure contains the following
additional information:
pid_t si_pid /* sending process ID */
uid_t si_uid /* 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
Printed 11/19/92 Page 1
SIGINFO(5-SVR4) RISC/os Reference Manual SIGINFO(5-SVR4)
FPEFLTOVF floating point overflow
FPEFLTUND floating point underflow
FPEFLTRES floating point inexact result
FPEFLTINV invalid floating point operation
FPEFLTSUB subscript out of range
SIGSEGV SEGVMAPERR address not mapped to object
SEGVACCERR invalid permissions for mapped object
Signal Code Reason
________________________________________________________
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________________
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 equal to the exit value of the process; other-
wise, it is equal to the signal that caused the process to
change state. For some implementations, the exact value of
Page 2 Printed 11/19/92
SIGINFO(5-SVR4) RISC/os Reference Manual SIGINFO(5-SVR4)
siaddr may not be available; in that case, siaddr is
guaranteed to be on the same page as the faulting instruc-
tion or memory reference.
Printed 11/19/92 Page 3