info > sigevent(7)

Not found locally for sigevent. Try Google search

๐Ÿ”– NAME

sigevent โ€” structure for notification from asynchronous routines

๐Ÿš€ Quick Reference

Use CaseCommandDescription
โฑ๏ธ Timer expiry notificationtimer_create(2)Use sigevent to specify delivery of signal, thread function, or no notification
๐Ÿ“‚ Async I/O completionaio_read(3), aio_write(3)Notify via signal or thread when asynchronous I/O finishes
๐Ÿ“จ Message queue arrivalmq_notify(3)Register for notification when a message arrives in an empty queue

๐Ÿ“– SYNOPSIS

#include <signal.h>

union sigval {            /* Data passed with notification */
    int     sival_int;    /* Integer value */
    void   *sival_ptr;    /* Pointer value */
};

struct sigevent {
    int    sigev_notify;  /* Notification method */
    int    sigev_signo;   /* Notification signal */
    union sigval sigev_value;
                          /* Data passed with notification */
    void (*sigev_notify_function) (union sigval);
                          /* Function used for thread
                             notification (SIGEV_THREAD) */
    void  *sigev_notify_attributes;
                          /* Attributes for notification thread
                             (SIGEV_THREAD) */
    pid_t  sigev_notify_thread_id;
                          /* ID of thread to signal
                             (SIGEV_THREAD_ID); Linux-specific */
};

๐Ÿ“ DESCRIPTION

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) SA_SIGINFO flag, then the following fields are set in the siginfo_t structure that is passed as the second argument of the handler:

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).

๐Ÿงต 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)).

๐Ÿง SIGEV_THREAD_ID (Linux-specific)

Currently used only by POSIX timers; see timer_create(2).

๐Ÿ“š SEE ALSO

๐Ÿ“„ COLOPHON

This page is part of release 5.10 of the Linux man-pages project. A description of the project, information about reporting bugs, and the latest version of this page, can be found at https://www.kernel.org/doc/man-pages/.

sigevent(7)
๐Ÿ”– NAME ๐Ÿš€ Quick Reference ๐Ÿ“– SYNOPSIS ๐Ÿ“ DESCRIPTION
๐Ÿ”‡ SIGEV_NONE ๐Ÿ”” SIGEV_SIGNAL ๐Ÿงต SIGEV_THREAD ๐Ÿง SIGEV_THREAD_ID (Linux-specific)
๐Ÿ“š SEE ALSO ๐Ÿ“„ COLOPHON

Generated by phpman v4.10.0-7-g98e9fd5 Author: Che Dong Under GNU General Public License
2026-09-07 03:01 @2600:1f28:365:80b0:6da3:f3b7:3cc7:cae0
CrawledBy CCBot/2.0 (https://commoncrawl.org/faq/)
Valid XHTML 1.0 Transitional!Valid CSS!