> -----Original Message-----
> From: Joel Cordonnier [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, February 07, 2001 12:12 PM
> To: [EMAIL PROTECTED]
> 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.