
Signals: The Kernel's Text Messages
Signals: The Kernel's Text Messages kill -9 Isn't What You Think It Is Reading time: ~10 minutes You've been saying "force kill" for years. You type kill -9 1234 when a process won't die, and you picture the operating system reaching in with a fist and crushing it. That's not what happens. What happens is the kernel sends the process a message. The message contains exactly one piece of information: the number 9. That's it. A number. The process gets a signal, and the signal is SIGKILL — signal 9. For a running process, termination is essentially immediate. But there's a case where even SIGKILL can't immediately kill a process: uninterruptible sleep — when a process is blocked in kernel code that cannot be safely interrupted. That delay, and what causes it, turns out to matter enormously. Signals are one of the oldest IPC mechanisms in Unix — older than sockets, older than most of the other things you'd reach for when you want two processes to communicate. They're asynchronous, they arr
Continue reading on Dev.to Tutorial
Opens in a new tab


