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

Process.destroy() and shutdown hook platform specific behavior

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 1.3.1
    • core-libs
    • sparc
    • solaris_8



      Name: boT120536 Date: 07/29/2001


      [also see bug # 4412451]
      -------
      java version "1.3.1"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-b24)
      Java HotSpot(TM) Client VM (build 1.3.1-b24, mixed mode)

      Scenario:

      1) MyClass1 sets in its constructor a shutdown hook and the main method of
      MyClass1 calls this constructor.
      2) A MyClass2 main method creates a new process using Runtime.exec() method
      with as the command line a java command with as the main class MyClass1.
      The retured object by the Runtime.exec() method is the Process object on the
      MyClass1 runtime.
      3) We call Process.destroy() method on the MyClass1 Process object.

      Here 2 different behaviors are obesrved:
      1) On Solaris the shutdown hook is triggered
      2) Whereas on NT it is not.

      Problem: The behavior of the Process.destroy() method differs on NT and Solaris
      OS.
      (Review ID: 127844)
      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            bonealsunw Bret O'neal (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: