Skip to content

Commit

Permalink
Issue mirkonasato#4: More aggressive shutdown of the office process
Browse files Browse the repository at this point in the history
Done.
  • Loading branch information
sdumitriu committed May 1, 2012
1 parent 47d8d5d commit 62f6fe5
Showing 1 changed file with 10 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,9 +207,16 @@ public int getExitCode(long retryInterval, long retryTimeout) throws RetryTimeou
}

public int forciblyTerminate(long retryInterval, long retryTimeout) throws IOException, RetryTimeoutException {
logger.info(String.format("trying to forcibly terminate process: '" + unoUrl + "'" + (pid != PID_UNKNOWN ? " (pid " + pid + ")" : "")));
processManager.kill(process, pid);
this.logger.info("trying to forcibly terminate process: '" + this.unoUrl + "'"
+ (this.pid != PID_UNKNOWN ? " (pid " + this.pid + ")" : ""));
if (this.pid == PID_UNKNOWN) {
long foundPid = this.processManager.findPid(new ProcessQuery("soffice.*", this.unoUrl.getAcceptString()));
if (foundPid != PID_UNKNOWN) {
this.processManager.kill(this.process, foundPid);
}
} else {
this.processManager.kill(this.process, this.pid);
}
return getExitCode(retryInterval, retryTimeout);
}

}

0 comments on commit 62f6fe5

Please sign in to comment.