siginfo_t

data structure containing signal information 

Data Structure


SYNOPSIS

#include <sys/siginfo.h>

union sigval {
	int sival_int;
	void *sival_ptr;
};

typedef struct {
	int si_signo;
	int si_code;
	union sigval si_value;
	int si_errno;
	pid_t si_pid;
	uid_t si_uid;
	void *si_addr;
	int si_status;
	int si_band;
} siginfo_t;


DESCRIPTION

The siginfo_t structure is passed as the second parameter to a user signal handler function, if the SA_SIGINFO flag was specified when the handler was installed with sigaction().

Fields of the Structure

The siginfo_t structure contains the following fields:

si_signo  

Signal number being delivered. This field is always set.

si_code  

Signal code. This field is always set. Refer to Signal Codes for information on valid settings, and for which of the remaining fields are valid for each code.

si_value  

Signal value.

si_errno  

If non-zero, an errno value associated with this signal.

si_pid  

Process ID of sending process.

si_uid  

Real user ID of sending process.

si_addr  

Address at which fault occurred.

si_status  

Exit value or signal for process termination.

si_band  

Band event for SIGPOLL/SIGIO.

st_mtime  

Time of last data modification.

Signal Codes

Signal Code Reason Additional Fields
SI_NOINFO The NuTCRACKER Platform was unable to determine complete signal information.
SI_USER Signal sent by kill(), pthread_kill(), raise(), abort() or alarm(). si_pid
si_uid
SI_QUEUE Signal was sent by sigqueue(). si_pid
si_uid
si_value
SI_TIMER Signal was generated by expiration of a timer set by timer_settimer().
SI_ASYNCIO Signal was generated by completion of an asynchronous I/O request.
SI_MESGQ Signal was generated by arrival of a message on an empty message queue.
SIGILL ILL_ILLOPC Illegal opcode. si_addr (address of failing instruction)
ILL_ILLOPN Illegal operand.
ILL_ILLADR Illegal addressing mode.
ILL_ILLTRP Illegal trap.
ILL_PRVOPC Privileged opcode.
ILL_PRVREG Privileged register.
ILL_COPROC Coprocessor error.
ILL_BADSTK Internal stack error.
SIGFPE FPE_INTDIV Integer divide-by-zero. si_addr (address of failing instruction)
FPE_INTOVF Integer overflow.
FPE_FLTDIV Floating point divide-by-zero.
FPE_FLTOVF Floating point overflow.
FPE_FLTUND Floating point underflow.
FPE_FLTRES Floating point inexact result.
FPE_FLTINV Invalid floating point operation.
FPE_FLTSUB Subscript out of range.
SIGSEGV SEGV_MAPERR Address not mapped. si_addr (address of faulting memory reference)
SEGV_ACCERR Invalid permissions.
SIGBUS BUS_ADRALN Invalid address alignment. si_addr (address of faulting memory reference)
BUS_ADRERR Non-existent physical address.
BUS_OBJERR Object-specific hardware error.
SIGTRAP TRAP_BRKPT Process breakpoint.
TRAP_TRACE Process trace trap.
SIGCHLD CLD_EXITED Child has exited. si_pid (child process ID)
si_uid (real user ID of process that sent the signal)
si_status (exit value or signal)
CLD_KILLED Child has terminated abnormally and did not create a core file.
CLD_DUMPED Child has terminated abnormally and created a core file.
CLD_TRAPPED Traced child has trapped.
CLD_STOPPED Child has stopped.
CLD_CONTINUED Stopped child has continued.
SIGIO/
SIGPOLL
POLL_IN Data input available. si_band
POLL_OUT Output buffers available.
POLL_MSG Input message available.
POLL_ERR I/O error.
POLL_PRI High priority input available.
POLL_HUP Device disconnected.


CONFORMANCE

UNIX 98, with exceptions.


PORTING ISSUES

Because of various Windows-specific issues, the NuTCRACKER Platform is unable to generate a correct siginfo_t in certain situations. In these cases, the si_code field is set to SI_NOINFO to indicate that the rest of the fields (other than si_signo) are not valid.

Not all of the codes listed in the DESCRIPTION section are actually generated. The codes are defined to allow for future expansion.

The NuTCRACKER Platform does not currently support the timer_settimer() or asynchronous I/O. Hence the si_code field is never SI_TIMER or SI_ASYNCIO.


AVAILABILITY

PTC MKS Toolkit for Professional Developers
PTC MKS Toolkit for Enterprise Developers
PTC MKS Toolkit for Enterprise Developers 64-Bit Edition


SEE ALSO

Functions:
abort(), alarm(), kill(), pthread_kill(), raise(), sigaction(), sigqueue()


PTC MKS Toolkit 9.6 patch 1 Documentation Build 5.