Question about POSIX libgcj signals / exception handling
Mohan Embar
gnustuff@thisiscool.com
Sat Mar 11 04:54:00 GMT 2006
Hi All,
I could dig into the code for this, but I was
wondering if anyone know the answer off the
top of their head.
Are the signal handlers in POSIX libgcj set up
such that the application is bulletproof and
immune from core dumps? Even if I do native stuff where
I divide by zero or dereference invalid pointers?
I'm not overly experienced with POSIX signal handling
and was wondering if a try...catch block in my main()
method was sufficient enough to catch all mishaps,
even native ones. Also, are there any restrictions
or caveats concerning what I can do when reacting to
exceptions triggered by such signals (as opposed to
"normal" Java exceptions)? I seem to recall from the
little UNIX programming I've done that you shouldn't
do too much in a signal handler.
Reading this:
http://gcc.gnu.org/java/port-signals.html
It appears that everything is handled properly in the
POSIX implementation, but I wanted to make sure.
These questions apply to both Linux c86 and OS X
PPC implementations.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/
More information about the Java
mailing list