Process Builder waitFor() issue and Open file limitations

前端 未结 4 1411
醉梦人生
醉梦人生 2020-12-03 18:11

I have inherited some code:

Process p = new ProcessBuilder(\"/bin/chmod\", \"777\", path).start();
p.waitFor();

Basically, there is for som

4条回答
  •  情书的邮戳
    2020-12-03 18:50

    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.

提交回复
热议问题