I have inherited some code:
Process p = new ProcessBuilder(\"/bin/chmod\", \"777\", path).start();
p.waitFor();
Basically, there is for som
It seems unlikely that the process would actually complete without closing the files. Could this be happening in a very large # of threads? Or perhaps some of them are not actually completing (ie, it is hanging at waitFor in some cases)?
Otherwise, I think you will be stuck with increasing the open files limit. Assuming that this is a Unix-like system, the "ulimit" command is probably what you are looking for.