---
name: "sigevent"
section: "7"
platform: "linux"
package: "man-pages"
version: "6.19-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/sigevent/3type"
---

# sigevent(7)

structure for notification from asynchronous routines

Part of [sigevent(3type)](/sigevent/3type.md).

## NAME

sigevent, sigval - structure for notification from asynchronous routines

## SYNOPSIS

```
#include <signal.h>
```

**struct sigevent {**     **int             sigev\_notify;**  /\* Notification type \*/     **int             sigev\_signo;**   /\* Signal number \*/     **union sigval    sigev\_value;**   /\* Data passed with notification \*/     **typeof(void (union sigval))  \*sigev\_notify\_function;**                                    /\* Notification function                                       (SIGEV\_THREAD) \*/     **pthread\_attr\_t \*sigev\_notify\_attributes;**                                    /\* Notification attributes \*/     /\* Linux only: \*/     **pid\_t           sigev\_notify\_thread\_id;**                                    /\* ID of thread to signal                                       (SIGEV\_THREAD\_ID) \*/ **};**

**union sigval {**                     /\* Data passed with notification \*/     **int             sival\_int;**     /\* Integer value \*/     **void           \*sival\_ptr;**     /\* Pointer value \*/ **};**

## DESCRIPTION

### sigevent

The *sigevent* structure is used by various APIs to describe the way a process is to be notified about an event (e.g., completion of an asynchronous request, expiration of a timer, or the arrival of a message).

The definition shown in the SYNOPSIS is approximate: some of the fields in the *sigevent* structure may be defined as part of a union. Programs should employ only those fields relevant to the value specified in *sigev\_notify*.

The *sigev\_notify* field specifies how notification is to be performed. This field can have one of the following values:

- **SIGEV\_NONE**

  A "null" notification: don't do anything when the event occurs.

- **SIGEV\_SIGNAL**

  Notify the process by sending the signal specified in *sigev\_signo*.

-

  If the signal is caught with a signal handler that was registered using the [**sigaction**(2)](/sigaction/2.md) **SA\_SIGINFO** flag, then the following fields are set in the *siginfo\_t* structure that is passed as the second argument of the handler:

  - *si\_code*

    This field is set to a value that depends on the API delivering the notification.

  - *si\_signo*

    This field is set to the signal number (i.e., the same value as in *sigev\_signo*).

  - *si\_value*

    This field is set to the value specified in *sigev\_value*.

-

  Depending on the API, other fields may also be set in the *siginfo\_t* structure.

-

  The same information is also available if the signal is accepted using [**sigwaitinfo**(2)](/sigwaitinfo/2.md).

- **SIGEV\_THREAD**

  Notify the process by invoking *sigev\_notify\_function* "as if" it were the start function of a new thread. (Among the implementation possibilities here are that each timer notification could result in the creation of a new thread, or that a single thread is created to receive all notifications.) The function is invoked with *sigev\_value* as its sole argument. If *sigev\_notify\_attributes* is not NULL, it should point to a *pthread\_attr\_t* structure that defines attributes for the new thread (see [**pthread\_attr\_init**(3)](/pthread_attr_init/3.md)).

- **SIGEV\_THREAD\_ID** (Linux-specific)

  Currently used only by POSIX timers; see [**timer\_create**(2)](/timer_create/2.md).

### sigval

Data passed with a signal.

## STANDARDS

POSIX.1-2024.

## HISTORY

POSIX.1-1996.

*\<aio.h\>* and *\<time.h\>* define *sigevent* since POSIX.1-2008.

## NOTES

The following headers also provide *sigevent*: *\<aio.h\>*, *\<mqueue.h\>*, and *\<time.h\>*.

## SEE ALSO

[**timer\_create**(2)](/timer_create/2.md), [**getaddrinfo\_a**(3)](/getaddrinfo_a/3.md), [**lio\_listio**(3)](/lio_listio/3.md), [**mq\_notify**(3)](/mq_notify/3.md), [**pthread\_sigqueue**(3)](/pthread_sigqueue/3.md), [**sigqueue**(3)](/sigqueue/3.md), [**aiocb**(3type)](/aiocb/3type.md), [**siginfo\_t**(3type)](/siginfo_t/3type.md)
