void () { int exitCode; try { mySteamSemaphore.acquire(2); myProcess.waitFor(); exitCode = myProcess.exitValue(); } catch (InterruptedException e) { if (LOG.isDebugEnabled()) { LOG.debug("Ignoring process exception: ", e); } exitCode = 255; } OUTPUT_LOG.debug(String.format("%s %% %s terminated (%s)", getCommand(), this.hashCode(), exitCode)); setExitCode(exitCode); listeners().processTerminated(exitCode); }