return process.waitFor();
} catch (InterruptedException exc) {
Thread.currentThread().interrupt();
logger.info("Execution interrupted, destroying the process.");
process.destroy();
throw new RuntimeIOException("Execution interrupted", exc);
}
} finally {
quietlyJoinThread(stdoutReaderThread);