----- Original Message -----
From: "Peter Donald" <[EMAIL PROTECTED]>
To: "Ant Developers List" <[EMAIL PROTECTED]>
Sent: Monday, February 11, 2002 12:20 AM
Subject: Re: <javac>, System.exit() and security managers


> On Mon, 11 Feb 2002 09:44, Steve Loughran wrote:
> > I have just committed the test case for javac which demonstrates that
> > unforked execution does not pick up exit codes, seemingly because there
is
> > no security manager in place to catch calls to System.exit(), which is
at
> > odds with my vague recollections.
>
> Unfortunately installing a security manager is backwards incompatible so
it
> not get added ;(
>
> > We have the ant.util.optional.NoExitSecurityManager, but IDEA says that
> > nobody is using this class. So how do are we currently trying to stop
> > <javac> tasks from calling System.exit(), and, given that it clearly
does
> > not work, how can we fix it.
>

Why is it incompatilbe?

We only need it when we are trying to run a java app inprocess with
failonerror=true; right now that is not the default, and it is utterly
broken.

Anyone who sets fork=false and failonerror=true either wants interception of
failures, which means we catch exceptions and system exits, or they need to
patch their build file to say failonerrror=false.

I dont see significant backwards compatibility issues here, unless there is
another aspect of the security manager I am missing. (yes I know about 1.1
versus 1.2+ issues; we'd have to compile a different SM for each VM and use
reflection to pick the appropriate one at run time)

-steve



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to