ant-dev mailing list archives

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

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

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

> 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.


> 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.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message