Skip to content

Commit

Permalink
Issue mirkonasato#5: Aggresive shutdown doesn't work with PureJavaPro…
Browse files Browse the repository at this point in the history
…cessManager

Fixed.
  • Loading branch information
sdumitriu authored and Christian Schröder committed Oct 8, 2012
1 parent 453fe94 commit 83908de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,11 @@ public int forciblyTerminate(long retryInterval, long retryTimeout) throws IOExc
+ (this.pid != PID_UNKNOWN ? " (pid " + this.pid + ")" : ""));
if (this.pid == PID_UNKNOWN) {
long foundPid = this.processManager.findPid(new ProcessQuery("soffice.*", this.unoUrl.getAcceptString()));
this.processManager.kill(this.process, foundPid);
try {
this.processManager.kill(this.process, foundPid);
} catch (IllegalArgumentException ex) {
this.logger.severe("Failed to forcibly terminate process: " + ex.getMessage());
}
} else {
this.processManager.kill(this.process, this.pid);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public void kill(Process process, long pid) throws IOException {
try {
sigar.kill(pid, Sigar.getSigNum("KILL"));
} catch (SigarException sigarException) {
throw new IOException("kill failed", sigarException);
throw new IllegalArgumentException("kill failed", sigarException);
} finally {
sigar.close();
}
Expand Down

0 comments on commit 83908de

Please sign in to comment.