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

Need AttachCurrentThreadAsDaemon in JNI interface

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • hotspot
    • None
    • beta3
    • generic
    • generic

      The dbx group has implemented a new mixed-language Java and C/C++ debugger
      called jdbx which works with Sun's JDK on Solaris. They have found that to
      properly support bound threads it is necessary for them to create a debug
      agent thread outside the JVM and then attach it using the JNI routine
      AttachCurrentThread (instead of using the JVMDI's RunDebugThread); however,
      AttachCurrentThread makes the new Java thread a non-daemon thread, which makes
      the JVM wait for that thread to terminate before exiting. Further, it is not
      possible to call setDaemon(true) on this new thread since it is considered to
      have "started" by the time AttachCurrentThread returns.

      Since this is a more general problem than just for debugging, we should add
      a new routine to the JNI interface, AttachCurrentThreadAsDaemon, which has the
      same effect as the existing AttachCurrentThread but which makes the Thread
      object a daemon before "starting" it.

      -------------------------------------

            kbr Kenneth Russell (Inactive)
            kbr Kenneth Russell (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: