The documentation for Xrs says
Reduces use of operating-system signals by the Java VM.
That means the JVM only installs fewer of its own signal handlers. Fewer signal handlers simply mean that more signals are handled through their default action. Which in many cases results in process termination.
Signals can either be suppressed through a signal mask, processed through a signal handler or various other means.
Currently the JDK offers no public APIs, but you can either use internal, unsupported ones (sun.misc.SignalHandler
) or jnr-posix.
Or if you mostly care about Ctrl+C and other keystrokes and not really the signals themselves you can detach the java process from the console via nohup java -jar ... > /dev/null &