J
Joshua Jones
Running on Win2k. I have something like this:
AntThread.java
==============
Process p;
try {
p = Runtime.getRuntime().exec(commandLine);
...
p.waitFor();
}
....
catch (InterruptedException e) {
p.destroy();
p = null;
}
finally {
cleanup();
}
==============
Another thread calls AntThread's interrupt() method, and I get to the
InterruptedException catch block. For some reason, however, this
process (an ant build process, which itself uses java) does not end.
I continue getting output from it, and only if I kill the process
manually through the task manager will it stop.
I can't get the PID from Java or anywhere else, which would be kludgy
anyway. Does anyone know why the destroy() method is not destroying,
or better yet, a solution?
AntThread.java
==============
Process p;
try {
p = Runtime.getRuntime().exec(commandLine);
...
p.waitFor();
}
....
catch (InterruptedException e) {
p.destroy();
p = null;
}
finally {
cleanup();
}
==============
Another thread calls AntThread's interrupt() method, and I get to the
InterruptedException catch block. For some reason, however, this
process (an ant build process, which itself uses java) does not end.
I continue getting output from it, and only if I kill the process
manually through the task manager will it stop.
I can't get the PID from Java or anywhere else, which would be kludgy
anyway. Does anyone know why the destroy() method is not destroying,
or better yet, a solution?