What You Will Learn
This chapter continues from Chapter 20 and 21, covering advanced signal topics used every day in embedded Linux and systems programming. You will learn how processes dump core, how realtime signals differ from standard signals, how to safely wait for signals without race conditions, and how to receive signals through a file descriptor — all with real C code examples.
Key Concepts in This Chapter
Chapter Contents
Learn what a core dump is, when it is produced, when it is NOT produced, and how Linux lets you control the name and location of core dump files.
Special rules for SIGKILL, SIGSTOP, SIGCONT and the stop signals. These signals have unique kernel-level behaviour you must know.
Understand how the Linux kernel puts processes to sleep and why SIGKILL cannot always act immediately.
SIGBUS, SIGFPE, SIGILL, SIGSEGV — signals triggered by CPU exceptions. Learn why you cannot safely ignore or block them.
Not all signals arrive unpredictably. Learn the difference between signals generated by external events vs signals you generate yourself.
When exactly is a pending signal delivered? What happens when multiple signals are unblocked at once?
Why sigaction() is always preferred over signal(). Understand the historical differences between System V and BSD semantics.
POSIX realtime signals: queued delivery, guaranteed order, data attachment via sigqueue(). This is critical for embedded and real-time systems.
The classic race condition when unblocking and waiting for a signal — and how sigsuspend() solves it atomically.
Use sigwaitinfo() and sigtimedwait() to wait for signals without writing a signal handler at all.
The Linux-specific signalfd() lets you read signals like reading a file — perfect for event-loop architectures with select/poll/epoll.
Can signals be used for IPC? Learn the limitations that make signals a poor general-purpose IPC mechanism.
Legacy APIs: sigset(), sighold(), sigvec(), sigblock() — what they are and why you should use POSIX equivalents instead.
Start Learning Now
All tutorials are free. Work through them in order for best understanding.
