Oliver Deakin wrote: > The example returns once they have fixed it. If you look at the example > just before the "Why Runtime.exec() hangs" heading (BadExecJava2.java) > you will see a situation that is almost exactly the same as in the test > case. > i.e. an exec followed by a waitFor(), without any reading of streams. > In this case the exec never returns. > > The later example is how to fix it.
I don't think so. When they are saying "the exec never returns", they are meaning that from the POV of the programmer, the spawned thing never returns. That's why you can do exec() do IO waitFor() done However, in our case, when I say "exec never returns" I mean "exec()" never returns. so you'd never actually get to "do IO" above, because you are hanging in exec(). Big difference, right? geir --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
