ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stefan Tilkov" <>
Subject Re: Re: <exec> and/or <java> in background
Date Wed, 12 Sep 2001 07:53:52 GMT

>On Fri, 24 Aug 2001, Stefan Tilkov <> wrote:

>> I have also noticed that parallel processing is a feature that is
>> going to be included in future ant versions, but I'm pretty much
>> forced to use a released version.

>So you have that feature in Ant 1.4 now.

>Problem is that the parallel processing ends when Ant is finished, so
>it doesn't really do what you need.  We've talked about the platform
>specific implementation of a "detach a process", but never went so far
>to actually do it 8-)

>> I could also code this myself.

>Go ahead.

I'll give it a try. I have implemented two different solutions in a quick
and dirty way: One is to use the platform specific shell - cmd.exe on NT,
/bin/sh on Unix -, the other one is to use a piece of native code that uses
spawn/fork. Since I don't want to clutter the Ant build process by having
to integrate a C compile step, I'll pursue the shell variant. I still have
some problems redirecting stdout/stderr, though. Do you have any opionion
on that?

>> My current thinking is that an additional parameter of the form
>> mentioned above [background={true|false}] would suffice,

>I'd prefer detach myself, but don't have a strong opinion on that.

>> and I would try to avoid changing the existing tasks by subclassing
>> one of them.

>This functionality should probably either go into Execute (a helper
>class used by all <exec>like tasks and <java fork="true">) or a
>separate class but not into a task itself.  The add the background
>attribute to <exec> and <java>, no need to subclass IMHO, you may want
>to have a background attribute for <apply> as well some day ...

OK, I'll try to do it with a patch to Execute.


View raw message