TOPIC LINUX
Processes & Signals how programs live and die
IN 10 SECONDS
A process is a running instance of a program with its own PID, memory space, and file descriptors. Signals are asynchronous notifications sent to processes to trigger actions like termination.
GOTCHA SIGKILL (9) cannot be caught or ignored. Processes terminated with SIGKILL have no chance to close database connections or save progress.
HOW A PROCESS RESPONDS TO SIGNALS
01 Trigger user or system sends a signal (e.g., kill -15 PID).
02 Signal Dispatch kernel halts process execution and transfers control to the signal handler.
03 Handler Action process either intercepts the signal (SIGTERM) to clean up, or gets terminated instantly by kernel (SIGKILL).
04 Exit status parent process reaps the exit code using wait() to avoid leaving a zombie process.
POKE IT YOURSELF
ps aux | grep nginx — find the process IDs (PIDs) of running apps
kill -9 PID — force kill a process instantly
Drill this topic →
~65 sec read