ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gregsmit <>
Subject Re: How does ant do exec "spawn=true" ?
Date Mon, 10 Mar 2008 21:48:53 GMT

Hi Steve,

Thanks -- That's what I thought (and what I've seen before)  That if you
started to read from the out/err of the child process, then it would
spawning doesn't work, IE, the parent exit causes the child to exit.

Do you unhook the input and output by closing the channels, something like

If I call that for the input, output, and error streams, without reading out
a single byte, then a process created through Runtime.exec() can live after
my Java process?

That's really cool, and not something I've really been able to find out
anywhere else.


Steve Loughran wrote:
> For spawning ant unhooks all input and output altogether. Close the 
> channels and let the recipient work it out for itself. No fancy java1.5+ 
> isms; everything works the same on java1.4.
> The moment you try and catch any of the output, spawned code doesnt 
> outlive your process.

View this message in context:
Sent from the Ant - Users mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message