---
name: "siginfo"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd"]
url: "https://new.carta.tech/siginfo"
---

# siginfo(3)

signal generation information

## NAME

**siginfo** – signal generation information

## SYNOPSIS

**#include \<signal.h\>**

## DESCRIPTION

A process may request signal information when it is catching a signal. The information specifies why the system generated that signal. To request signal information in a signal handler, the user can set SA\_SIGINFO in *sa\_flags* before [sigaction(2)](/sigaction/2.md) is called, otherwise the user can use [sigwaitinfo(2)](/sigwaitinfo/2.md) and [sigtimedwait(2)](/sigtimedwait/2.md) to get signal information. In either case, the system returns the information in a structure of type *siginfo\_t*, which includes the following information:

| | | |
| --- | --- | --- |
| **Type** | **Member** | **Description** |
| *int* | *si\_signo* |  |
| *int* | *si\_errno* |  |
| *int* | *si\_code* |  |
| *union* *sigval* | *si\_value* |  |
| *pid\_t* | *si\_pid* |  |
| *uid\_t* | *si\_uid* |  |
| *void* | *\*si\_addr* |  |
| *int* | *si\_status* |  |
| *long* | *si\_band* |  |
| *int* | *si\_trapno* |  |
| *int* | *si\_timerid* |  |
| *int* | *si\_overrun* |  |
| *int* | *si\_mqd* |  |
| *int* | *si\_syscall* |  |

The *si\_signo* member contains the signal number.

The *si\_errno* member contains an error number defined in the file ⟨errno.h⟩.

The *si\_code* member contains a code which describes the cause of the signal. The macros specified in the **Code** column of the following table are defined for use as values of *si\_code* that are signal-specific or non-signal-specific reasons why the signal was generated:

| | | |
| --- | --- | --- |
| **Signal** | **Code** | **Reason** |
| SIGILL | ILL\_ILLOPC |  |
|  | ILL\_ILLOPN |  |
|  | ILL\_ILLADR |  |
|  | ILL\_ILLTRP |  |
|  | ILL\_PRVOPC |  |
|  | ILL\_PRVREG |  |
|  | ILL\_COPROC |  |
|  | ILL\_BADSTK |  |
| SIGFPE | FPE\_INTDIV |  |
|  | FPE\_INTOVF |  |
|  | FPE\_FLTDIV |  |
|  | FPE\_FLTOVF |  |
|  | FPE\_FLTUND |  |
|  | FPE\_FLTRES |  |
|  | FPE\_FLTINV |  |
|  | FPE\_FLTSUB |  |
| SIGSEGV | SEGV\_MAPERR |  |
|  | SEGV\_ACCERR |  |
| SIGBUS | BUS\_ADRALN |  |
|  | BUS\_ADRERR |  |
|  | BUS\_OBJERR |  |
|  | BUS\_OOMERR |  |
| SIGTRAP | TRAP\_BRKPT |  |
|  | TRAP\_TRACE |  |
|  | TRAP\_DTRACE |  |
|  | TRAP\_CAP |  |
| SIGCHLD | CLD\_EXITED |  |
|  | CLD\_KILLED |  |
|  | CLD\_DUMPED |  |
|  | CLD\_TRAPPED |  |
|  | CLD\_STOPPED |  |
|  | CLD\_CONTINUED |  |
| SIGPOLL | POLL\_IN |  |
|  | POLL\_OUT |  |
|  | POLL\_MSG |  |
|  | POLL\_ERR |  |
|  | POLL\_PRI |  |
|  | POLL\_HUP |  |
| Any | SI\_NOINFO |  |
|  | SI\_USER |  |
|  | SI\_QUEUE |  |
|  | SI\_TIMER |  |
|  | SI\_ASYNCIO |  |
|  | SI\_MESGQ |  |
|  | SI\_KERNEL |  |
|  | SI\_LWP |  |

For synchronous signals, *si\_addr* is generally set to the address of the faulting instruction. However, synchronous signals raised by a faulting memory access such as SIGSEGV and SIGBUS may report the address of the faulting memory access (if available) in *si\_addr* instead. Additionally SIGTRAP raised by a hardware watchpoint exception may report the data address that triggered the watchpoint in *si\_addr*.

Synchronous signals set *si\_trapno* to a machine-dependent trap number.

In addition, the following signal-specific information is available:

| | | |
| --- | --- | --- |
| **Signal** | **Member** | **Value** |
| SIGCHLD | *si\_pid* |  |
|  | *si\_status* |  |
|  | *si\_uid* | real user ID of the process that sent the signal |
| SIGPOLL | *si\_band* | band event for |

Finally, the following code-specific information is available:

| | | |
| --- | --- | --- |
| **Code** | **Member** | **Value** |
| SI\_USER | *si\_pid* |  |
|  | *si\_uid* |  |
| SI\_QUEUE | *si\_value* |  |
|  | *si\_pid* |  |
|  | *si\_uid* |  |
| SI\_TIMER | *si\_value* |  |
|  | *si\_timerid* |  |
|  | *si\_overrun* |  |
|  | *si\_errno* |  |
| SI\_ASYNCIO | *si\_value* |  |
| SI\_MESGQ | *si\_value* |  |
|  | *si\_mqd* |  |
| SI\_LWP | *si\_pid* |  |
|  | *si\_uid* |  |

## NOTES

Currently, the kernel never generates the SIGPOLL signal. SIGCHLD signal is queued when a process changed its status or exited. POSIX Realtime Extensions like aio, timer, and message queue also queue signals. Signals with code SI\_USER, SI\_KERNEL or SI\_LWP are only queued if there are sufficient resources; otherwise, SI\_NOINFO results. For some hardware architectures, the exact value of *si\_addr* might not be available.

## SEE ALSO

[aio\_read(2)](/aio_read/2.md), [kill(2)](/kill/2.md), [mq\_notify(2)](/mq_notify/2.md), [sigaction(2)](/sigaction/2.md), [sigqueue(2)](/sigqueue/2.md), [sigwaitinfo(2)](/sigwaitinfo/2.md), [timer\_create(2)](/timer_create/2.md), [timer\_settime(2)](/timer_settime/2.md), [waitpid(2)](/waitpid/2.md), [pthread\_kill(3)](/pthread_kill/3.md)

## STANDARDS

The *siginfo\_t* type conforms to IEEE Std 1003.1-2004 (“POSIX.1”).

## HISTORY

Full support for POSIX signal information first appeared in FreeBSD 7.0. The codes SI\_USER and SI\_KERNEL can be generated as of FreeBSD 8.1. The code SI\_LWP can be generated as of FreeBSD 9.0.

## AUTHORS

This manual page was written by David Xu ⟨*davidxu@FreeBSD.org*⟩.
