tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pier Fumagalli <>
Subject Re: signals with JNI
Date Wed, 07 Feb 2001 04:50:36 GMT
Pier Fumagalli <> 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 Fumagalli                                 <>

View raw message