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

Add documentation about Arguments::_exit_hook

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 12
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b17

      Description

      The following fields are assigned to according to JavaVMOption.optionString.

      abort_hook_t Arguments::_abort_hook = NULL;
      exit_hook_t Arguments::_exit_hook = NULL;
      vfprintf_hook_t Arguments::_vfprintf_hook = NULL;

      However, there's no code in the JDK repo that uses these options. Instead, they are intended for programs that embed the JVM using JNI_CreateJavaVM.

      We should add comments in arguments.cpp to clarify this. Otherwise this would look like dead code and someone might be tempted to remove it.

      P.S. official docs are here: https://docs.oracle.com/javase/7/docs/technotes/guides/jni/spec/invocation.html

        Attachments

          Activity

            People

            Assignee:
            iklam Ioi Lam
            Reporter:
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: