Start a daemon. There is some fun here, as this can be spawning or non-spawning. if it spawns, it outlives ant (which doesnt block), but output gets lost. This task only works on Ant1.6 or later, as that was when spawning was added to the system. This task starts a daemon which is only terminated by external request, and which blocks the calling thread until it terminates This means the build file calling this routine must either execute it in a separate thread (using parallel/sequential containers), and call <sf-stopdaemon> in a separate thread to end itset the standalone property to true to run it in a new process.set the timeout to enforce a death time on the process.Timeout killing of a process is somewhat brutal; we do not (yet) cleanly shut down the localhost, though that is a distinctly possible option in future.
|