You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Stefan Bodewig <bo...@apache.org> on 2001/12/11 15:03:29 UTC

Re: [PATCH] Execute.java now registers forked processes so they are d estroyed when VM exits (i.e. ctrl-C)

Hi Michael,

I've committed your patch, please take a look, thanks.

On Wed, 21 Nov 2001, <MN...@tacintel.com> wrote:

> ProcessDestroyer.java (new file, currently in the
> org.apache.tools.ant.taskdefs package)

I have changed the class so that it doesn't use JDK 1.2 collection
classes, that way it compiles on JDK 1.1 as well (and does nothing, of
course).

> When you run with the patch, and hit ctrl-C, you get the following
> output (shutdown hook runs):

I can verify, that the shutdown hook in ProcessDestroyer gets called,
but I never get

>      [java] shutting down TestProcess

on my RedHat 7.2 box.  I guess Process.destroy() is doing something
nasty enough on Linux that the spawned JVM doesn't get a chance to run
its exit handlers.

The testcase can be run from Ant's build file via the
interactive-tests target.

Stefan

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>