ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hal Hildebrand \(web\)" <Hal.Hildebr...@hellblazer.com>
Subject Re: setting environment variables using ant
Date Wed, 08 May 2002 23:01:38 GMT
Did this survive the death of the parent process?  I don't know when it
changed, but I was convinced that spawned processes from Java would be
child processes and die when their parent process (java, in this case)
died.

Maybe this behavior was a "fluke" of the particular version I was
testing.  In any event, is the survival of the spawned process part of
the defined behavior on all platforms (or those that matter)?

It's unclear from the exec() method comment what the supported behavior
is.

----- Original Message -----
From: "Dominique Devienne" <DDevienne@lgc.com>


> Well, I'm not sure. A patch was provided that allows <exec> to "fire
and
> forget" a process, but this patch was never incorporated. ANT
specifically
> does a waitFor() on the child process currently. For more details, see
> http://marc.theaimsgroup.com/?l=ant-user&m=101526169919866&w=2 . I
have the
> patch from Charles Hudak dated April 3rd, 2002. Might need to be
adapted to
> current code base. --DD
>
> -----Original Message-----
> From: Hal Hildebrand (web) [mailto:Hal.Hildebrand@hellblazer.com]
> Sent: Wednesday, May 08, 2002 3:31 PM
> To: Ant Users List
> Subject: Re: setting environment variables using ant
>
> The start and forget aspect is a problem with the Java runtime exec,
not
> Ant.  It's a child process issue in that the parent process death
kills
> all the children  Strangely, under JDK 1.4 - at least under
WinXP/2000 -
> I find that runtime exec *does* spawn new processes that don't die
when
> the parent Java process dies.  This is extremely annoying in the
> opposite way.  I launch a bunch of parallel tasks for testing, and if
I
> ^C the parent Ant process, they stick around.
>
> I'm not sure of the "fire and forget" feature of JDK 1.4 - it may only
> be a Windows aberration.  But it's a welcome aberration.
>
> So if this *is* consistent and supported behavior across all
platforms,
> then it's trivial to make a "fire and forget" execute task.
>
> ----- Original Message -----
> From: "Scott Ganyo" <scott.ganyo@eTapestry.com>
>
>
> > > classpath it should use. But then again, ANT is not an
> > > application launcher
> > > either, although it can do it (hangs around, and filters the
> > > output though,
> > > since the 'start and forget' capability of <exec> doesn't
> > > seem to make it
> > > into ANT)...
> >
> > This is a real shame, too, since I do use Ant to launch
applications.
> (The
> > reason I need to do that is that Ant is the thing that knows how to
> create
> > the correct classpath for the applications that it builds for me.)
> >
> > Scott
> >
>
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
<mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:ant-user-help@jakarta.apache.org>
>
>
>


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


Mime
View raw message