Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ siginfo(5) — CX/UX 6.20

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

kill(2)

sigaction(2)

sigsendset(2)

waitid(2)

signal(5)

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 siginfo_t, which includes the following information:

int si_signo/∗ signal number ∗/
int si_errno/∗ error number ∗/
int si_code/∗ signal code ∗/

si_signo contains the system-generated signal number.  (For the waitid(2) function, si_signo is always SIGCHLD.) 

If si_errno is non-zero, it contains an error number associated with this signal, as defined in errno.h. 

si_code contains a code identifying the cause of the signal.  If the value of si_code 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_t structure contains the following additional information:

pid_t si_pid/∗ sending process ID ∗/
uid_t si_uid/∗ sending user ID ∗/

Otherwise, si_code contains a signal-specific reason why the signal was generated.  These codes are described in signal(5). 

In addition, the following signal-dependent information is available for kernel-generated signals:

Signal Field Value






SIGFPE int si_ncodes number of exception blocks∗
exblk_t ∗si_exblks pointer to exception blocks∗
SIGSEGV caddr_t si_addr address of faulting memory reference
SIGBUS int si_ncodes number of exception blocks∗
exblk_t ∗si_exblks pointer to exception blocks∗
SIGCHLD pid_t si_pid child process ID
int si_status exit value or signal
clock_t si_utime child’s user time
clock_t si_stime child’s system time

See <sys/ucontext.h> for the definition of exception blocks. 

SEE ALSO

kill(2), sigaction(2), sigsendset(2), waitid(2), signal(5). 

NOTES

For SIGCHLD signals, if si_code is equal to CLD_EXITED, then si_status is equal to the exit value of the process; otherwise, it is equal to the signal that caused the process to change state. 

On the Series 4000 architecture, the exact value of si_addr may not be available. 

CX/UX Programmer’s Reference Manual

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026