As pointed out in a related question , you should not call SignalHandler.SIG_DFL in SignalHandler as you are calling SEGV . In fact, the JVM does not use SIG_DFL either (for INT , TERM , and HUP ).
Under the covers, all Java does, when it receives any of these signals, System.exit() called. Therefore, if you want to reproduce the default behavior, just call System.exit() yourself. Obviously, if you do not want to exit in response to a signal, there is no need to call the old / standard signal handler.
Warning: this is undocumented behavior. It is unlikely, but entirely possible, that future releases of Java may change this behavior.
source share