Quote Originally Posted by password636 View Post
My understanding is this: by the time the parent terminates, if there are child processes already terminated and still running, init will adopt the running ones, not the already terminated ones. (don't the "active" and "still exists" in apue2 mean this?) So a zombie child process won't be adopted by init. In my case, by the time the parent terminates, the child is not "active" and won't be adopted by init.
Why would it behave that way? That would cause zombies to stack up on the system, which is incorrect.

init adopts ALL processes whose parents have died, whether those processes are still running or not.