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

Process.destroy() method behavior is not guarnateed on Unixes

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 1.3.0
    • core-libs
    • None
    • sparc
    • solaris_8

      When running external projects via Runtime.exec() method on Unixes, sometimes it cannot be terminated via Process.destroy() method. I was looking at the sources of JVM and discovered, that destroy() method delegates to JNI call, which then call kill() system call, but uses SIGTERM as signal.

      This unfortunately does not have to kill the process, so there is actually no way how to guarantee the spawned process can be terminated uncoditionaly.

      So I suggest to either to change signal to SIGKILL or to define several levels of destroying process in Java, in which the highest level would send SIGKILL, the lower SIGTERM, etc ...

            kkladkosunw Konstantin Kladko (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: