I working on a project that needs to run a shell file in MAC OS for many times. The shell file writes the result of each run on a separate log file. To speed up the process I have to use all the available cores in our machine. I tried to do this using BuildProcess in Java. It works fine for few seconds but the processes stop after few seconds. Each process takes about 18 hours when running on single core machine. For instance if run the followings it starts two processes and keeps them running for about 10 seconds but then they will be killed with no error!
ProcessBuilder pb1 = new ProcessBuilder("/bin/bash", "runFS.sh") Process p1 = pb1.start() ProcessBuilder pb2 = new ProcessBuilder("/bin/bash", "runFS.sh") Process p2 = pb2.start();
Any help would be most appreciated.