RFR 9: 8087286 Need a way to handle control-C and possibly some other signals

Mandy Chung mandy.chung at oracle.com
Fri Feb 5 04:24:05 UTC 2016

> On Feb 4, 2016, at 5:05 PM, David Holmes <david.holmes at oracle.com> wrote:
> Java hasn't needed a public signal handling API for the last 20 years. It's only getting one now because modularity is forcing us to cut-off sun.misc.Signal from the few use-cases that do need it. And we now have a "shell" mechanism that also wants to do some process management. This is fundamentally about ctrl-C and ctrl-\ hooks because the native shells turn those into signals.

As a data point, the primary use case I gathered and reported by some customers using sun.misc.Signal is the ability to intercept control-C.  SIGTERM, SIGKILL, SIGTRAP are also intercepted in addition to SIGINT [1]

[1] http://mail.openjdk.java.net/pipermail/jigsaw-dev/2015-June/004362.html

More information about the hotspot-runtime-dev mailing list