How to catch SIGSEGV in JNI methods ?
843829Dec 20 2004 — edited Dec 21 2004Hello,
is there a way to catch segmentation faults in JNI methods ?
On Windows, I can catch(...) exceptions in C++ code and then throw a Java RuntimeException - which can be handled gracefully (kind of).
On Unix, a SIGSEGV or SIGBUS signal is raised which immediately kills the JVM :-(
I already managed to install my own signal handler, but it is called after the JVM dies.
I would like to use my own handler in place of the JVM's handler.
What's the deal about libjsig.so ? Do I have to write my own JVM launcher to use it ?
-- Peter