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

Deprecate the archaic signal-chaining interfaces: sigset and signal

    XMLWordPrintable

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P3
    • Resolution: Approved
    • Fix Version/s: 16
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • Compatibility Kind:
      behavioral
    • Compatibility Risk:
      minimal
    • Compatibility Risk Description:
      Both sigset and signal have been marked as APIs to not be used for many, many years. We do not expect anyone still using the signal-chaining facility to be using them.
    • Interface Kind:
      Other
    • Scope:
      JDK

      Description

      Summary

      Deprecate the archaic signal-chaining interfaces sigset and signal, with a view to remove them in JDK 17.

      Problem

      The signal-chaining facility was introduced in JDK 1.4 nearly 20 years ago and supported three different Linux signal API's: sigset, signal and sigaction:

      https://docs.oracle.com/javase/8/docs/technotes/guides/vm/signal-chaining.html

      Only sigaction is a Posix supported API for multi-threaded processes, that we can use cross-platform. Both signal and sigset are obsolete and have undefined behaviour in a multi-threaded process. From the Linux man pages:

      sigset: This API is obsolete: new applications should use the POSIX signal API (sigaction(2), sigprocmask(2), etc.)

      signal: The behavior of signal() varies across UNIX versions, and has also varied historically across different versions of Linux. Avoid its use: use sigaction(2) instead.

      Solution

      Deprecate the use of sigset and signal with a view to removing them in JDK 17.

      Specification

      There is no actual specification for this functionality, only the documentation in the VM guide which we no longer seem to produce.

      If the user invokes the sigset or signal functions in the signal chaining library, then we will issue a deprecation warning. e.g.

      The use of the sigset function is deprecated and will be removed in a future release. Use the sigaction function instead.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dholmes David Holmes
              Reporter:
              dholmes David Holmes
              Reviewed By:
              Alan Bateman, Daniel Daugherty
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: