I learnt Runtime.getRuntime().exec() is used to call external applications from Java. There are processbuilders and apache commons exec which can also be used.
But I have few basic questions.
How does the sub process creation takes place?. Will it inherit same memory that of the parent process?. Can we take control of memory allocation for the child process?.
If parent process is killed, will it kill the child processes too?
How much costlier (in terms of resource) does the creating a child process affects the parent process.
Is there any pitfalls while doing so?.
I tried searching online but couldn't find a clear answer to my questions.
Thanks,