unix command line program does not exit after closing stdin : <p>I create a <code>Process</code> object in Java (the program is html tidy if that is important), feed it some data via stdin (<code>Process.getOutputStream()</code>), and closed the stream, but when I call <code>Process.waitFor()</code> it never returns because the process doesn't exit. How do I fix this without calling <code>Process.destroy()</code>?</p>
