ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stephane Bailliez <sbaill...@imediation.com>
Subject RE: newbie: how to redirect std input to a subprocess. HELP !!
Date Wed, 07 Feb 2001 11:55:14 GMT
> -----Original Message-----
> From: Joel Cordonnier [mailto:jocordonn@yahoo.fr]
> Sent: Wednesday, February 07, 2001 12:12 PM
> To: ant-user@jakarta.apache.org
> Subject: newbie: how to redirect std input to a subprocess. HELP !!
> 
> I have download the Ant1.2 source code, browse to the
> taskdefs directory, and see how the CVS task use the
> PumpStreamHandler class to redirect it's stdout...
> OK!

> Hox to custom this class ? Do you have some sample ?

Fork a process using the Execute/CommandLine classes and pass your
customized handler.

> I have already try to custom the PumpStreamHandler
> class, but I have the following PROBLEM:

> I have a (new) thread that read the inputstream and
> redirect to the stdin of the Exec Ant class, and a
> thread that collect the stdout as the
> PumpStreamHandler.

> But my (new) input thread that died before my
> subprocess finished, and the process is blocked.

I'm afraid I don't understand, could you please elaborate a little bit ?

-- 
 St├ęphane Bailliez 
 Software Engineer, Paris - France 
 iMediation - http://www.imediation.com 
 Disclaimer: All the opinions expressed above are mine and not those from my
company. 

Mime
View raw message