Multiple choice technology programming languages

5.) How do I get rid of zombie processes?

  1. a) Use popen() & pclose()

  2. b) Use wait()

  3. c) Use ps()

  4. d) None

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

Zombie processes are children that have terminated but still occupy process table entries. wait() (or waitpid()) is called by parent to reap them, removing the zombie. ps() only lists processes, it doesn't clean zombies.