This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
threads+CNI+SIGINT
- To: java-discuss at sourceware dot cygnus dot com
- Subject: threads+CNI+SIGINT
- From: Oskar Liljeblad <osk at hem dot passagen dot se>
- Date: Sun, 26 Mar 2000 10:35:10 +0200
- Cc: osk at hem dot passagen dot se
- Reply-To: osk at hem dot passagen dot se
I'm playing with ncurses in Java through CNI. There's a demo program,
called Rain, that I translated. It displays ASCII-art raindrops that
later disappears - like a screen saver.
When I compile and run this java program, and interrupt it using CTRL+C,
one thread is not killed - the main thread doing all graphics.
(Resulting in a badly messed up terminal, anyway.) I can kill
the program with killall -9 Rain though, and the raindrops stop.
I'm certainly no expert, but it would seem this problem is related to
the Linux posix thread implementation. Ncurses overwrites the SIGINT
signal - but only if handler is SIG_DFL. This is however true for
the thread which Ncurses is initialized in (main-method thread).
Don't GCJ-compiled programs have some SIGINT handler? If so, why isn't
it installed in the main thread? If not, how is GC cleanup/finalization
done?
Oskar Liljeblad (osk@hem.passagen.se)