Return-Path: Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 45821 invoked by uid 500); 18 Aug 2003 18:57:38 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 45717 invoked from network); 18 Aug 2003 18:57:37 -0000 Received: from palrel13.hp.com (156.153.255.238) by daedalus.apache.org with SMTP; 18 Aug 2003 18:57:37 -0000 Received: from klaatu.cv.hp.com (smtp2.cv.hp.com [15.0.200.102]) by palrel13.hp.com (Postfix) with ESMTP id 174651C020E3 for ; Mon, 18 Aug 2003 11:57:42 -0700 (PDT) Received: from iseran.com (chamonix.cv.hp.com [15.87.26.62]) by klaatu.cv.hp.com (Postfix) with ESMTP id 6E9E22BC46 for ; Mon, 18 Aug 2003 12:07:54 -0700 (PDT) Message-ID: <3F412016.1080504@iseran.com> Date: Mon, 18 Aug 2003 11:51:02 -0700 From: Steve Loughran User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030701 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Developers List Subject: Re: Task "exec" with attribute "output" References: <8B4A710A4FF0E8449E1066277C45C58E947B@Fenris> In-Reply-To: <8B4A710A4FF0E8449E1066277C45C58E947B@Fenris> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Morten Mortensen wrote: > Hi all, > > I experience some funny stuff with the "exec" task, when I set the "output" > attribute. It very much appears to me as if the output-stream does not get > flushed. Tried 1.5.3 and some 1.6's. > > (I continue to have little luck with searching the bug-database; keep > getting lists a numbers out - probably a user-error - ...) > > I suspect, that there is a "Runtime.exec()" hidden in there somewhere below > the "ExecTask". yup And some "Process.getOutputStream()". Maybe in ExecuteStreamHandler > Instead I find lots of > OS-specific stuff (like direct invocation of "cmd.exe" instead of JNI with > ::ShellExecuteEx() - well, fair enough!). Well, we dont use non-standard JNI calls as that would need ant to build and run custom DLLS/shared libs. And I wouldnt use ::ShellExecuteEx() in that case anyway, because, well, its the wrong way to start command line programs in Win32. > Where do I find the "Runtime.exec()" triggered by "ExecTask.execute()"? > I would like to have a closer look. Execute.java There are custom inner classes to handle exec on different platforms *and* different Java runtimes. So that runtime.exec you seek is in there, maybe loaded via reflection. > > Have you ever discussed using a "SplitOutputStream" to have output from > "exec" guided to both a file and Ant-std-out at the same time - to see > progress while still preserving the information in a file - ? -Or a more > generic mechanism attached to Ant-std-out with tasks like "split-begin" and > "split-end"? You mean a more generic Unix style pipe architecture, dont you? | | ... Its been thought about; Filterchains do it for transformations to files, but not for generic execution & output processing...you need to use intermediary files there > > Hope one of you care to answer. :-) > > Regards, > Morten Sabroe Mortensen > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org