How to send events/signal from C to Java in JNI -
is there mechanism send asynchronous events/signals through jni c java or viceversa? need catch signal/event c java.
it sounds bit tricky, jni supposed one-way only: java code can invoke native method, of course may call java code, can't initiate process.
but isn't impossible, think straightforward solution have native call blocks until signal received.
another option write jvmti agent, can interfere running vm actively.
but if we're talking unix signals, can handle not public api (therefore not guaranteed in future , sun vm specific) existing sun.misc.signal
class.
Comments
Post a Comment