`
tcspecial
  • 浏览: 911516 次
  • 性别: Icon_minigender_1
  • 来自: 深圳
社区版块
存档分类
最新评论

Cannot run program "videostore: Too many open files

    博客分类:
  • java
阅读更多

   java.io.IOException: Cannot run program "videostore": java.io.IOException: error=24, Too many open files

  Javadoc says:

The parent process uses these streams to feed input to and get output from the subprocess. Because some native platforms only provide limited buffer size for standard input and output streams, failure to promptly write the input stream or read the output stream of the subprocess may cause the subprocess to block, and even deadlock.

  SecondlywaitFor() your process to terminate. You then should close the input, output and error streams.

  Finally destroy() your Process. 

 

 

Process proc=null;
try {
	ProcessBuilder pb = new ProcessBuilder(params);
	pb.redirectErrorStream(true);
	proc = pb.start();
	proc.waitFor();
} catch (Exception e) {
    log.error("QtStore: ",e);
    return;
}finally{
	if(proc!=null) //关闭输入输出流,释放内存
          proc.destroy(); 
}

  

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics