edwardcapriolo/farsandra — pull request #3 by antoniobarbuzzi (2014-08-15 13:20:00+00:00)
Title: Added methods to handle process termination

After calling the method Farsandra#start, currently it is impossible to determine if the process terminated because of an error or it is still running.
Moreover, when using the CountDownLatch, if the process terminates (or crashes) immediately after calling the start method, the await() method blocks forever.

I've exposed a few methods to determine if the process is running, namely isRunning, getExitValue and waitFor.
Moreover I'd added a method to add a process termination handler, in order to be able to decrement the CountDownLatch if the process terminates or crashes, and avoiding blocking forever.