This has nothing to do with the signals that the JVM captures / receives, but all that has to do with the terrible termination of the Gnome process, which apparently should be incompatible with not completely pinching the bed (and jdk does not have an api for this ) If you want to see an even worse consequence of this, try running:
dbus-monitor --profile --session type='method_call',interface='org.gnome.SessionManager'
in the shell and logout or restart: it will cause the gnome shell to crash and hang up the computer until you enter TTY and order a restart. Maybe kdbus will fix it in this case, maybe not. The only thing I know is that shutdownhooks on a Java application using AWT (not on the command line) NEVER launch their shutdownhooks on GNOME3. In fact, a virtual machine will always exit with a non-zero code (failure), presumably from native code. At least it does not hang, although this makes the disconnect hooks completely useless (I tried to make a workaround using the dbus monitor, but, as you can see from the example I gave, this is too dangerous).
source share