ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MNewc...@tacintel.com
Subject RE: [PATCH] Execute.java now registers forked processes so they a re d estroyed when VM exits (i.e. ctrl-C)
Date Tue, 11 Dec 2001 15:07:30 GMT
I ran my tests on Windows NT 4.0.  I guess I should have stated that in the
test case some where.

I just tested on Solaris 7 and observed the same behavior you did.  The
unix-jdks must be using SIGKILL for Process.destroy()?  Well, on Windows NT,
the subprocesses shutdown hooks are run.  So, there is an inconsistency in
the way the JDKs operate.  Great....

I guess there isn't any harm in leaving it in, or should we remove it all
together since it is inconsistent?

Sorry for the trouble,
Michael


-----Original Message-----
From: Stefan Bodewig [mailto:bodewig@apache.org]
Sent: Tuesday, December 11, 2001 9:03 AM
To: ant-dev@jakarta.apache.org
Subject: 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, <MNewcomb@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:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

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