CS FundamentalsModerateGATE CS · Amazon/Microsoft SDE MCQ

A parent forks 3 children that each call exit(0) immediately; the parent then sleeps for a minute without calling wait() and without handling SIGCHLD. During that minute, what are the children?

  1. A. Orphans adopted by init, which reaps them
  2. B. Three zombies, each still holding a process-table entry
  3. C. Fully removed at once, since exit() frees every trace of them
  4. D. Stopped processes that resume running when the parent wakes up

Correct answer: B. Three zombies, each still holding a process-table entry

A terminated child keeps its PID and exit status until the parent waits for it, so the 3 become zombies. They become orphans (and get reaped by init) only if the parent itself exits.

More Operating Systems questions

Exams that ask this topic