Since the shell will not wait for a child that runs in the background, another way is needed to avoid creating lots of zombies.
When the child terminates, a signal (SIGCHLD) is sent to the parent.
The parent (the shell) will need a handler for SIGCHLD to handle children that terminate and/or stop.
In the handler,the parent should delete the terminated child from the job list or change its state to stopped (ST)!
The race: if the child stops or terminates before it has been added to the job list, this is a problem!