-
Enhancement
-
Resolution: Duplicate
-
P3
-
None
-
5.0
-
generic
-
generic
Currently, an application can use Permissions and ProtectionDomains to
catch an attempt by code from a particular codebase to call System.exit,
and throw a SecurityException. However, there is no mechanism to allow
the status value from the exit() call to be obtained.
An application (e.g. netbeans) can install a custom SecurityManager (sm) to
intercept calls (e.g. made by ant) to sm.checkExit(), and obtain the status
value. Unfortunately, this prevents ant from installing a SecurityManager
to catch calls made by an application it runs (since only one SecurityManager
is allowed).
Perhaps the status value could be included as the "action" in the
RuntimePermission object. This would allow custom ProtectionDomain object
to grab the status value and save it somewhere useful.
catch an attempt by code from a particular codebase to call System.exit,
and throw a SecurityException. However, there is no mechanism to allow
the status value from the exit() call to be obtained.
An application (e.g. netbeans) can install a custom SecurityManager (sm) to
intercept calls (e.g. made by ant) to sm.checkExit(), and obtain the status
value. Unfortunately, this prevents ant from installing a SecurityManager
to catch calls made by an application it runs (since only one SecurityManager
is allowed).
Perhaps the status value could be included as the "action" in the
RuntimePermission object. This would allow custom ProtectionDomain object
to grab the status value and save it somewhere useful.
- duplicates
-
JDK-6268673 Make RuntimePermission exitVM target more fine grained by adding exit status value
-
- Resolved
-