Pier Fumagalli <[EMAIL PROTECTED]> wrote:
> 
> So far the same code you wrote works with SIGHUP, SIGKILL and SIGUSR?...

Uh uh uh... So damn stupid Pier :) Now I get it, it's not because of
SIGSEGV, but it's because a SIGSEGV is raised when the VM is created... :)

Now I remember when I saw that message in the first place...

Basically, what happens is that the "main" thread, to be able to receive
signals, must be "detached" from the VM... By "detached" I don't mean
calling the JNI_Detach_Thread() function, but it _MUST_ return before any
signal can be caught (and this is a bug in the invocation stuff!!!!)...

What you can do is:
1) create the VM
2) set the SIGSEGV handler
3) create a new Thread() that is the one which will call your main() method

In this order it "should" work... (In theory, as always!)

    Pier

-- 
Pier Fumagalli                                 <mailto:[EMAIL PROTECTED]>



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to