Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 69955 invoked from network); 7 Feb 2001 11:11:56 -0000 Received: from web12201.mail.yahoo.com (216.136.173.85) by h31.sny.collab.net with SMTP; 7 Feb 2001 11:11:56 -0000 Message-ID: <20010207111206.31941.qmail@web12201.mail.yahoo.com> Received: from [193.150.166.54] by web12201.mail.yahoo.com; Wed, 07 Feb 2001 12:12:06 CET Date: Wed, 7 Feb 2001 12:12:06 +0100 (CET) From: =?iso-8859-1?q?Joel=20Cordonnier?= Subject: newbie: how to redirect std input to a subprocess. HELP !! To: ant-user@jakarta.apache.org MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N 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