Is there any possibility that I can directly send signal to a Java virtual machine which is created by calling JVM_CreateJavavm
in native C/C++ code?
e.g.:
For a normal Java process, say its pid is 12345, I can send a signal 3 to it like this ... kill -3 12345, and hopefully I could trigger javacore or heapdump by changing JVM configurations.
However if the JVM is created thru JNI API and wrapped inside a C/C++ application, on开发者_StackOverflowly the native process's PID is visible, in that case if I send signal to that process, the whole process is just terminated and seems the JVM cannot receive the signal at all.
Thanks in advance ...
No. There is no separate process for the JVM. The JVM is just running in the process that called it. I don't think that Sun documents a way to use those signal handlers via the invocation interface.
http://www.scribd.com/doc/13119378/If-JNI-based-application-is-crashing-check-signal-handling
精彩评论