Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5101798

RuntimePermission exitVM needs access to status code

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0
    • security-libs

      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.

            mullan Sean Mullan
            foliversunw Fred Oliver (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: