-XX:[+|-]HandleSIGUSR2
(AIX®, Linux®, macOS®, and z/OS® only)
This option affects the handling of the SIGUSR2
signal. This signal is user-defined and triggers the user2
event, which is commonly used for taking system dump files with exclusive access. The operating system installs a default signal handler for handling SIGUSR2
. If there is no VM or application signal handler, then the operating system's signal handler is used.
Syntax
-XX:[+|-]HandleSIGAUSR2
Setting | Effect | Default |
---|---|---|
-XX:+HandleSIGUSR2 |
Enable | yes |
-XX:-HandleSIGUSR2 |
Disable |
Explanation
When enabled, the VM handles the SIGUSR2
signal and generates the user2
event, which can be configured with the -Xdump
option to trigger a dump agent.
When the option is disabled, the VM does not handle the SIGUSR2
signal and therefore, the VM signal handler is not installed. Generally, the default operating system handler that is installed for the SIGUSR2
signal takes over the handling of the signal.
For more information about the signals and signal handling, see Signal handling.
Note: Do not use the -XX:+HandleSIGUSR2
and -Xrs
options together. An error is thrown if both options are enabled. To resolve this error, one of the options should be disabled.