Skip to content

Commit

Permalink
Add process.destroyForcibly()
Browse files Browse the repository at this point in the history
  • Loading branch information
talarian1 committed Jun 19, 2023
1 parent 93ef08c commit 1df3414
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ public CommandResults exeCommand(File execDir, List<String> args, List<String> c
boolean outputReaderTerminatedProperly = service.awaitTermination(TIMEOUT_SECONDS, TimeUnit.SECONDS);
boolean terminatedProperly = executionTerminatedProperly && outputReaderTerminatedProperly;
return getCommandResults(terminatedProperly, args, inputStreamReader.getOutput(), errorStreamReader.getOutput(), process.exitValue());
} finally {
// Ensure termination of the subprocess we have created.
process.destroyForcibly();
}
} finally {
service.shutdownNow();
Expand Down

0 comments on commit 1df3414

Please sign in to comment.