Who Adopts The Orphans

Process a creates b, b creates c, and c creates d and e. All five are still running, and the tree looks like this:

Process tree before c exits init (pid 1) a b c d e

Now c calls exit(0), and b reaps it. What is the tree immediately afterwards?

A

d and e keep c as their parent and c stays in the tree as a zombie until they exit

B

d and e become children of init, so the tree has a to b on one branch and d and e hanging directly off init

C

d and e become children of b, since a process is re-parented to its nearest surviving ancestor

D

d and e are sent SIGHUP and terminate, because a process cannot outlive its parent