Resolved: system: Resource temporarily unavailable, which one?

In this post, we will see how to resolve system: Resource temporarily unavailable, which one?

Question:

I search for answer and so far haven’t found a clear one.
I am doing testing which launches many threads calling “system()”, like below.
When I run the program, at certain point it will display.
Is there way to know which resource? I fix the max processes issue so I think it may be due to something else.

Best Answer:

This error means that some system call called by the system library function returned EGAIN. Most likely is the fork call, which can fail with EAGAIN for a number of reasons:

If you have better answer, please add a comment about this, thank you!

Source: Stackoverflow.com