SIGALRM Signal Explained (Signal 14)
What the Linux SIGALRM signal does and when it's used.
Published October 24, 2026
SIGALRM (signal 14) is delivered when a timer set with alarm() or setitimer() expires. It is used for timeouts.
What it does
Default action: Terminate. It can be caught with a signal handler.
Typically sent by: the kernel when an alarm timer fires. List all signals with kill -l.
Signal number and delivery
kill -l | grep SIGALRM
14) SIGALRM
kill -14 1234 # or kill -ALRM 1234
(signal delivered to process 1234)
Practical examples
Send it from the shell
kill -14 <PID>
kill -SIGALRM <PID>
pkill -14 nginxHandle it in a script
trap 'echo got SIGALRM; cleanup; exit' SIGALRM
while true; do sleep 1; doneHandle it in code
import signal, sys
def handler(sig, frame):
print('received', sig)
sys.exit(0)
signal.signal(signal.SIGALRM, handler)Common mistakes
- Using kill -9 before trying SIGTERM.
- Forgetting to find the right PID (ps aux | grep, pgrep).
- Not handling signals in long-running services.
Key takeaways
- SIGALRM is signal 14.
- Default: Terminate.
- Use kill -l to list all signals.
FAQ
How do I time-limit a command?
Use timeout 10 command, which relies on signals.
How do I list all signals?
Run kill -l.