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

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -