ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <ste...@apache.org>
Subject Re: How does ant do exec "spawn=true" ?
Date Tue, 11 Mar 2008 10:37:38 GMT
gregsmit wrote:
> 
> 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
> this:
> process.getInputStream().getChannel().close()?
> 
> 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.
> 

I think so, though  you'd have to ask on the developer list to be sure. 
All I know is that code is complex, but it has reached that level of 
complexity in order to work everywhere.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message