Fix: cleanup working dir after blender has exited
This commit is contained in:
@@ -145,9 +145,18 @@ public abstract class OS {
|
||||
* @param proc Process to kill
|
||||
* @return true if proc wasn't null and was destroyed
|
||||
*/
|
||||
public boolean kill(Process proc) {
|
||||
public boolean kill(Process proc) throws InterruptedException {
|
||||
if (proc != null) {
|
||||
proc.destroy();
|
||||
|
||||
for (int i = 0; i <= 30; i++) {
|
||||
if (proc.isAlive() == false) {
|
||||
return true;
|
||||
}
|
||||
java.lang.Thread.sleep(100);
|
||||
}
|
||||
|
||||
proc.destroyForcibly();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user