I have this server that's only jobs is to run this scientific Fortran code and send the results back to the client. I had an earlier issue where there was so much diagnostic messages and just plain junk output being sent to std out that some buffer, that's internal to java implantation for running external processes, was getting filled causing my external process to goto sleep. Now the my server doesn't care about any this junk so when we were running Solaris, I just piped all that output to /dev/null and that fixed everything. However we recently just had a major server failure and our IT guy switched us over to Ubuntu and now this issue has cropped back up again. The code in question is
How can I prevent this process from getting stuck without having to continually read in the output and clear it.
Code:
...
ProcessBuilder processbuilder = new ProcessBuilder(execCommand, file.getFullFileName(), "> /dev/null");
processBuilder.directory(file.directory);
processBuilder.redirectErrorStream(true);
Process reconCode = processBuilder.start();
reconCode.waitFor();
...
How can I prevent this process from getting stuck without having to continually read in the output and clear it.