And how can one find out whether any of them are occuring, and leading to an error returned by fork() or system()? In other words, if fork() or system() returns with an error, what are some things in Linux that I can check to diagnose why that particular error is happening?
For example:
- Just plain out of memory (results in errno ENOMEM) - check memory use with 'free' etc.
- Not enough memory for kernel to copy page tables and other accounting information of parent process (results in errno EAGAIN)
- Is there a global process limit? (results in errno EAGAIN also?)
- Is there a per-user process limit? How can I find out what it is?
- ...?