if (!terminate(-10, completionHandler)) {
throw new IllegalStateException("Cannot terminate terminated process");
}
}
private synchronized boolean terminate(int exitCode, Handler<Void> completionHandler) {
<BUG>if (status != ExecStatus.TERMINATED) {
</BUG>
updateStatus(
ExecStatus.TERMINATED,
exitCode,

if (!terminate(-10, completionHandler)) {
throw new IllegalStateException("Cannot terminate terminated process");
}
}
private synchronized boolean terminate(int exitCode, Handler<Void> completionHandler) {
if (processStatus != ExecStatus.TERMINATED) {
updateStatus(
ExecStatus.TERMINATED,
exitCode,
