Zombie Process
ELI5 — The Vibe Check
A zombie process is a process that's dead but won't go away — it's finished executing but still shows up in the process table because its parent never collected its exit status. It's the walking dead of your operating system. A few zombies are harmless, but too many can exhaust your process table. The fix? Tell the parent process to wait() for its children. Or just restart everything.
Real Talk
A zombie process (defunct process) is a process that has completed execution but still has an entry in the process table because its parent hasn't called wait() to read its exit status. Zombies consume no resources except a PID table entry, but excessive zombies can exhaust PID limits. They're common in server applications that fork child processes without proper cleanup.
Show Me The Code
# Show zombie processes
ps aux | grep 'Z'
# Count zombies
ps aux | awk '{if($8=="Z") print}' | wc -l
# Find the parent of zombies
ps -o ppid= -p <zombie_pid>
When You'll Hear This
"We've got 500 zombie processes — the worker isn't reaping its children." / "Always handle SIGCHLD to prevent zombie processes."
Related Terms
Child Process
A child process is when your Node.js app spawns a completely separate process to do work.
Debug
Debugging is the process of finding and fixing the gremlins in your code. Something is broken, and you need to play detective — adding clues (console.
Memory Leak
A memory leak is when your program keeps grabbing more memory but never gives it back, like filling a bathtub without a drain.
Process
A process is a full running program with its own isolated chunk of memory.
Worker
A worker is a background process that picks up jobs from a queue and does the heavy lifting.