Is there a difference between zombie and defunct processes? I have found the wikipedia article where it is written that this two are the same. In that case why it is needed to have 2 different terms for the same process:
https://en.wikipedia.org/wiki/Zombie_process
A defunct process, also known as a zombie, is simply a process that is no longer running, but remains in the process table to allow the parent to collect its exit status information before removing it from the process table.
A zombie process is a process in its terminated state. This usually happens in a program that has parent-child functions. After a child function has finished execution, it sends an exit status to its parent function.
An orphan process is formed when it's parent dies while the process continues to execute, while zombie process is a process which has terminated but it's entry is there in the system.
Both Zombie
and defunct
are same. ZOMBIE
is the one of the state of the process
while there is no defunct
state, you can see it from your kernel source code.
enum proc_state {
UNUSED, /*** processes in initial state **/
EMBRYO,
SLEEPING,
RUNNABLE,
RUNNING,
ZOMBIE /** processes in final state **/
};
Zombie state means where it has exited but has not yet been cleaned up.
you can open man page of proc(1)
and see this /proc/[pid]/stat
Status information about the process. This is used by ps(1)
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With