This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Question about POSIX libgcj signals / exception handling
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: java at gcc dot gnu dot org
- Date: Fri, 10 Mar 2006 22:54:20 -0600
- Subject: Question about POSIX libgcj signals / exception handling
- Reply-to: gnustuff at thisiscool dot com
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/