SIGALRM

SIGALRM
Description Alarm clock
Default action Abnormal termination of the process
SA_SIGINFO macros

None

On POSIX-compliant platforms, SIGALRM is the signal sent to a process when a time limit has elapsed. The symbolic constant for SIGALRM is defined in the signal.h header file. Symbolic signal names are used because signal numbers can vary across platforms.

Etymology

SIG is a common prefix for signal names. ALRM stands for alarm.

Usage

Computer programs often use SIGALRM to make a long-running action time out, or to provide a way of performing an action at regular intervals.

SIGALRM is generally raised a whole number of seconds after an alarm system call is made. It is sometimes used to implement the sleep function; consequently, programs cannot reliably use alarm to "wake up" from a delay caused by sleep [1].