Skip to content
Snippets Groups Projects
Commit d5b1f003 authored by Hague Matthew UXAC009's avatar Hague Matthew UXAC009
Browse files

Make SubmissionWrapper.close kill if necessary

parent fb58bce2
Branches
No related tags found
No related merge requests found
...@@ -174,6 +174,8 @@ public class SubmissionWrapper implements AutoCloseable { ...@@ -174,6 +174,8 @@ public class SubmissionWrapper implements AutoCloseable {
* Close the streams and kill the submission * Close the streams and kill the submission
*/ */
public void close() { public void close() {
waitFor();
flushOutputStreams(); flushOutputStreams();
try { try {
...@@ -527,6 +529,9 @@ public class SubmissionWrapper implements AutoCloseable { ...@@ -527,6 +529,9 @@ public class SubmissionWrapper implements AutoCloseable {
try { try {
process.waitFor(TIMEOUT, TimeUnit.SECONDS); process.waitFor(TIMEOUT, TimeUnit.SECONDS);
} catch (InterruptedException e) { } catch (InterruptedException e) {
// no nothing
} finally {
// make sure it's really shutdown
process.destroyForcibly(); process.destroyForcibly();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment