Say I have a C program that does:
The system() call creates a new PID at each call. Therefore, when the maximum number of PIDs is reached, the ls command becomes <defunct> and eventually the system crashes.
I tried also popen() but it is the same result.
Is there a way of avoiding this behavior?