java.lang.Process.waitFor() is hanging
<p>I am trying to execute below command on Solaris which is hanging.</p>

<blockquote>
  <p>swmml -l /tmp/swmmlLog.txt -n N1 -e DISPLAY-M3UA-LSET;</p>
  
  <p>;swmml -> perl script.</p>
</blockquote>

<p>I tried to flush out the streams/closing the streams. Nothing is working. I tried with both <code>ProcessBBuilder</code> and <code>Runtime.exec()</code> but of no success.</p>

<p>We tried to read from the streams.But the read method is itself hanging.
The following code is not printing anything.</p>

<pre><code> while (true) {
     String s = br.readLine ();
     if (s == null) break;
     System.out.println (s);
 }
</code></pre>
