I want to create a script to simulate a process that hangs to test a java application. My java app executes a system command, which can also be executing scripts, etc. Any ideas on such a script?
The java code is:
Runtime rt = Runtime.getRuntime();
Process p = rt.exec("sh ./someTestScript.sh");
int exitValue = p.waitFor(); // If process hangs I don't get an exitValue