Unix Signals
2025-07-27 programmingconcept sketch
# Signal Default Comment POSIX
Name Action
1 SIGHUP Terminate Hang up controlling terminal or Yes
process
2 SIGINT Terminate Interrupt from keyboard, Control-C Yes
3 SIGQUIT Dump Quit from keyboard, Control-\ Yes
4 SIGILL Dump Illegal instruction Yes
5 SIGTRAP Dump Breakpoint for debugging No
6 SIGABRT Dump Abnormal termination Yes
6 SIGIOT Dump Equivalent to SIGABRT No
7 SIGBUS Dump Bus error No
8 SIGFPE Dump Floating-point exception Yes
9 SIGKILL Terminate Forced-process termination Yes
10 SIGUSR1 Terminate Available to processes Yes
11 SIGSEGV Dump Invalid memory reference Yes
12 SIGUSR2 Terminate Available to processes Yes
13 SIGPIPE Terminate Write to pipe with no readers Yes
14 SIGALRM Terminate Real-timer clock Yes
15 SIGTERM Terminate Process termination Yes
16 SIGSTKFLT Terminate Coprocessor stack error No
17 SIGCHLD Ignore Child process stopped or terminated Yes
or got a signal if traced
18 SIGCONT Continue Resume execution, if stopped Yes
19 SIGSTOP Stop Stop process execution, Ctrl-Z Yes
20 SIGTSTP Stop Stop process issued from tty Yes
21 SIGTTIN Stop Background process requires input Yes
22 SIGTTOU Stop Background process requires output Yes
23 SIGURG Ignore Urgent condition on socket No
24 SIGXCPU Dump CPU time limit exceeded No
25 SIGXFSZ Dump File size limit exceeded No
26 SIGVTALRM Terminate Virtual timer clock No
27 SIGPROF Terminate Profile timer clock No
28 SIGWINCH Ignore Window resizing No
29 SIGIO Terminate I/O now possible No
29 SIGPOLL Terminate Equivalent to SIGIO No
30 SIGPWR Terminate Power supply failure No
31 SIGSYS Dump Bad system call No
31 SIGUNUSED Dump Equivalent to SIGSYS No
^da7611
Introduction To Unix Signals Programming
https://en.wikipedia.org/wiki/Category:Unix_signals
https://wiki.c2.com/?GrossDeficienciesOfUnix
Unix Signals:
Definition: Asynchronous notifications sent to a process to signal an event or interrupt.
Types:
Synchronous (e.g., division by zero)
Asynchronous (e.g., keyboard interrupt,
Ctrl+C
)
Handling:
Signal handlers: User-defined functions to handle signals.
Default actions: Predefined actions (e.g., terminate, ignore, or continue).
Blocking: Temporarily ignoring signals.
Key signals:
SIGINT
(interrupt)SIGTERM
(termination request)SIGKILL
(forced termination)SIGALRM
(timer expiration)
Sending signals:
kill
commandraise
function (from within a process)sigqueue
function (for real-time signals)
Important aspects:
Signals are not queued; if a signal is sent while a process is handling another signal, it may be lost.
Signals can be used for inter-process communication (IPC).
Signal handlers should be concise and avoid complex operations to prevent deadlocks or other issues.
Domain (AI Generated)
Operating System Internals or Computer Systems Programming.
World-class best people (AI Generated)
Some notable experts on Unix signals include:
Richard Stevens - Author of "Advanced Programming in the UNIX Environment"
W. Richard Stevens - Author of "UNIX Network Programming"
Eric Raymond - Author of "The Art of UNIX Programming"
Michael Kerrisk - Author of "The Linux Programming Interface"
Rob Pike - Co-designer of the Plan 9 operating system and expert on Unix-like systems.
Internet Resources
Should you be scared of Unix signals? (2016) hn ref Should you be scared of Unix signals?
- 257 points, 155 comments
- 257 points, 155 comments
The evolving Unix attitudes on handling signals in your code hn ref
- 77 points, 31 comments
- 77 points, 31 comments
Should you be scared of Unix signals? hn ref
- 155 points, 82 comments
- 155 points, 82 comments
Siren worlds and the perils of over-optimised search lw
Conjecture: A Roadmap for Cognitive Software and ... lw
Plausibly Factoring Conjectures lw
Wikipedia, Github, Stack Overflow, Quora, Reddit
Google, Youtube, Google Images, Google Scholar
Incoming Internal References (0)
Outgoing Web References (34)
-
www.cs.kent.edu/~ruttan/sysprog/lectures/signals.html
- Introduction To Unix Signals Programming
-
dsa.cs.tsinghua.edu.cn/oj/static/unix_signal.html
- POSIX signals
-
man7.org/linux/man-pages/man7/signal.7.html
- signal(7) - Linux manual page
-
venam.net/blog/unix/2016/10/21/unix-signals.html
- Unix Signals Blog
-
en.wikipedia.org/wiki/Category:Unix_signals
- https://en.wikipedia.org/wiki/Category:Unix_signals
-
wiki.c2.com/?GrossDeficienciesOfUnix
- https://wiki.c2.com/?GrossDeficienciesOfUnix
-
www.google.com/search?q=site%3Anews.ycombinator.com+Unix%20signals
- Hackernews
-
news.ycombinator.com/item?id=37899098
- hn
-
jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
- ref
-
jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
- Should you be scared of Unix signals?
-
news.ycombinator.com/item?id=36569526
- hn
-
utcc.utoronto.ca/~cks/space/blog/unix/SignalHandlingOverTime
- ref
-
news.ycombinator.com/item?id=11898034
- hn
-
jvns.ca/blog/2016/06/13/should-you-be-scared-of-signals
- ref
-
www.google.com/search?q=site%3Awww.lesswrong.com+Unix%20signals
- Lesswrong
-
www.lesswrong.com/posts/nFv2buafNc9jSaxAH/siren-worlds-and-the-perils-of-over-optimised-search
- lw
-
www.lesswrong.com/posts/H26ndkABmGvoc9PTC/conjecture-a-roadmap-for-cognitive-software-and-a-humanist
- lw
-
www.lesswrong.com/posts/LYQ2C87DsB4qxwc6a/plausibly-factoring-conjectures
- lw
-
www.google.com/search?q=site%3Alobste.rs+Unix%20signals
- Lobsters
-
lobste.rs/s/m9bhxk/beyond_ctrl_c_dark_corners_unix_signal
- lobste.rs
-
lobste.rs/s/wd6tjx/how_old_various_unix_signals_are
- lobste.rs
-
lobste.rs/s/bi29lp/why_programmers_can_t_stop_programs_with
- lobste.rs
-
eruser.ai/search?q=Unix%20signals
- PeruserAI
-
chat.openai.com/chat?q=Unix%20signals
- ChatGPT
-
claude.ai/new?q=Unix%20signals
- Claude
-
www.google.com/search?q=site%3Aen.wikipedia.org+Unix%20signals
- Wikipedia
-
www.google.com/search?q=site%3Agithub.com+Unix%20signals
- Github
-
www.google.com/search?q=site%3Astackoverflow.com+Unix%20signals
- Stack Overflow
-
www.google.com/search?q=site%3Aquora.com+Unix%20signals
- Quora
-
www.google.com/search?q=site%3Areddit.com+Unix%20signals
-
www.google.com/search?q=Unix%20signals
-
www.youtube.com/results?search_query=Unix%20signals
- Youtube
-
www.google.com/search?tbm=isch&q=Unix%20signals
- Google Images
-
cholar.google.com/scholar?q=Unix%20signals
- Google Scholar