Zombie processes are the child processes that have terminated but their parent process has not retrieved their exit status yet. Bash scripts can prevent them when the parent process waits for and cleans up the terminated child processes This can be accomplished by trapping the SIGCHLD signal and calling the wait command to collect the exit status.