It is well-known that a program that calls Process.waitFor
without closing or draining the process output is subject
to deadlock if the process writes more data to its stdout or stderr
than fits into the OS pipe buffer which holds this data.
On Solaris or Linux, there is no control over the size of the
pipe buffer, and is, respectively 13k (!) and 4k.
On Windows, the application (JDK) has control over the size of
the buffer when the subprocess is created, and currently a size of 512
is hard-coded. We should probably raise that to either the Solaris or Linux
limit, both for process I/O throughput and for deadlock avoidance.