From: p <p.a...@tu...> - 2006-06-17 08:45:10
|
Niel Markwick <nielm <at> bigfoot.com> writes: > > > On Fri, 16 Jun 2006 17:01:31 +0200, Bellekens, P.A.E. > <P.A.E.Bellekens <at> TUE.nl> wrote: > > However, we are having troubles linking the output of the XMLTV > > application to ours. > ... > > This code should normally wait until the grabber is finished, print all > > STDOUT output to the screen and return an exitcode. > > > > However, for some reason the executing of this program never stops, it > > hangs somewhere. It seems like there is some kind of deadlock, and the 2 > > applications are waiting for the same resource. > > > > The execution hangs on the first "input.readLine();" statement. > > When using runtime.exec in Java, you must read from both stdout and stderr > -- reading from only one of these streams when the process writes to both > will usually cause the process to block... Thanks to all! that indeed did the trick. I always though that stderr and stdout were two independent streams, and you could read from whichever you want. thanks for the help p. |