The Java HotSpot VM registers console events as shown in Table 7-1.
Table 7-1 Console Events
Console Event | Signal | Usage |
---|---|---|
|
|
This event and signal is used to terminate a process. (Optional) |
|
|
This event and signal is used by the shutdown hook mechanism when the VM is terminated abnormally. (Optional) |
|
|
This event and signal is used to dump Java stack traces at the standard error stream. (Optional) |
If an application must register its own console handler, then the -Xrs
option can be used. With this option, shutdown hooks are not run on SIGTERM
(with above mapping of events) and thread dump support is not available on SIGBREAK
(with above mapping of the Control+Break event).