ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Burton" <bi...@progress.com>
Subject Re: [PATCH] Asynchronous execution of processes
Date Sat, 10 Nov 2001 19:42:15 GMT
Hello,

Stefan Bodewig wrote:
> 
> > The changes do not rely on any OS specifics (all Java) and you can
> > still use the timeout option to stop the forked process (as long as
> > ANT's VM is still running).
> 
> I'm not sure whether this satisfies all use cases people have for
> detach, leaving the currently running VM completely would probably be
> preferred by most people.  Maybe we should use your version for all
> the OSes we don't have an OS dependent version for?

It doesn't.  What I had in mind for detached usage was to give Ant the
ability to be an application launcher.  Many applications use platform
specific scripts--shell scripts on UNIX and .bat files for Windows, etc. 
This is a real pain not just because one needs to write and maintain both
types of scripts but also because Windows .bat files are so limited in
functionality.  

So, although Ant can already be used as an application launcher, it's JVM
hangs around waiting for the application to exit.  This is wasteful and
means the build file can only launch one application per invocation of
Ant.  

> The Unix case would be more or less trivial as long as detach="true"
> implies running via a shell script.  A platform dependent solution
> would make the use of a timeout feature impossible, but I don't think
> a combination of detach (which is spawn and forget about it in my
> book) and timeout is something people will need anyway.

Agreed.

> Why does detach imply fork for <java> using your implementation?  You
> could as well wrap a daemon thread around invoking the classes main as
> well.

That's an interesting idea.  However, when the build finishes the daemon
thread will be terminated.  Users might want more flexibility with at
least the ability to wait for the thread to complete at a certain point in
the build.

-Bill


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message