wait for Process
来源:互联网 发布:淘宝网购 编辑:程序博客网 时间:2024/04/30 14:54
如果仅仅是用process.waitFor()的话,如果进程挂起这个将永远得不到返回值,是用捕捉getExitValue异常的办法可以work around
private int myWaitProcessFinish(Process process) throws InterruptedException{
boolean finish = false;
int exitValue = -1;
int timeout = 0;
while(!finish && 60 < timeout++){
try{
exitValue = process.exitValue();
finish = true;
} catch(Exception e) {
Thread.sleep(500);
}
}
return exitValue;
}
- wait for Process
- wait && child process && fork
- Wait for
- Wait for Whidbey
- Wait For Ajax
- nobody wait for you
- Never Wait for Weights
- wait for Debug 小米
- fastboot wait for device
- 【Codeforces696E】...Wait for it...
- gRPC Wait for Ready
- Process Functions for Debugging
- wait for a undo record
- STM8的wait for interrupt
- idea+genymotion,wait for adb
- BZOJ4690 Never Wait for Weights
- [bzoj4690]Never Wait for Weights
- 4690: Never Wait for Weights
- MFC类与对应头文件
- Flex制作人人开心农场工具
- 链接库(二)unix系
- 判断窗体是否关闭
- 编程资料"小抄本"
- wait for Process
- Shell script
- 幽默:编程语言 / 操作系统
- ssh
- 开博了
- C#利用PropertyInfo反射类实现二个类属性值的比较
- 好好学习
- XEN虚拟机如何修改系统时间?
- 设置GtkEntry的背景颜色