Output child processes remain in the process table as zombies. Zombie processes exist until their parent invokes wait or waitpid to get their exit status. In addition, a corresponding process identifier is stored to prevent other newly created processes from duplicating it.
In your case, the process table becomes too large, and the system refuses to create new processes.
Forking processes and then not obtaining exit status can be considered as a resource leak. When the parent exits, they will be accepted by the init process and then received, but if the parent remains too long, there is no way for the system to simply remove some of the zombies, since it is assumed that the parent should be interested in them at some point through wait or waitpid .
source share