RFR: 8257572: Deprecate the archaic signal-chaining interfaces: sigset and signal

David Holmes dholmes at openjdk.java.net
Thu Dec 3 04:41:01 UTC 2020


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.

We should deprecate the use of signal and sigset in JDK 16 with a view to their removal in JDK 17.

A CSR request has been filed.

Testing: hotspot/jtreg/runtime/signal tests

Thanks,
David

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

Commit messages:
 - 8257572: Deprecate the archaic signal-chaining interfaces: sigset and signal

Changes: https://git.openjdk.java.net/jdk/pull/1587/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=1587&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8257572
  Stats: 7 lines in 2 files changed: 7 ins; 0 del; 0 mod
  Patch: https://git.openjdk.java.net/jdk/pull/1587.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/1587/head:pull/1587

PR: https://git.openjdk.java.net/jdk/pull/1587



More information about the build-dev mailing list