ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joel Cordonnier <jocord...@yahoo.fr>
Subject newbie: how to redirect std input to a subprocess. HELP !!
Date Wed, 07 Feb 2001 11:12:06 GMT
Hi!

I'm a newbie with Ant so...

I am writing a new Ant task. I have to redirect
standard input to a subprocess likes :

'MyInputFileName >> MyExecName

and redirect the standard output to a file like

MyExecName >> myOutputFileName.

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 ?

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.

thanks for any help
Joel



___________________________________________________________
Do You Yahoo!? -- Pour dialoguer en direct avec vos amis, 
Yahoo! Messenger : http://fr.messenger.yahoo.com

Mime
View raw message