Search code examples
linuxprocesszombie-process

Zombie vs Defunct processes?


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


Solution

  • For Linux "defunct" and "zombie" processes are the same.

    From man ps:

    Processes marked <defunct> are dead processes (so-called "zombies") that remain because their parent has not destroyed them properly. These processes will be destroyed by init(8) if the parent process exits.

    PROCESS STATE CODES
        Here are the different values that the s, stat and state output specifiers (header "STAT" or "S") will display to describe the state of a process:
        D    uninterruptible sleep (usually IO)
        R    running or runnable (on run queue)
        S    interruptible sleep (waiting for an event to complete)
        T    stopped by job control signal
        t    stopped by debugger during the tracing
        W    paging (not valid since the 2.6.xx kernel)
        X    dead (should never be seen)
        Z    defunct ("zombie") process, terminated but not reaped by its parent