public synchronized void kill() {
      running = false;
      closed = true;

      try {
        stdin.close();
      } catch (IOException e) {
        // in case it was closed
      }
      try {
        process.destroy();
      } catch (Exception e) {
        // in case it was already destroyed or can't be
      }
    }
Try to clean up as much as possible from a shell that's gotten itself wedged. Hopefully
the StreamGobblers will croak on their own when the other side of the pipe is closed.
imitate/src/main/java/com/engineer/imitate/shell/Shell.java