This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

threads+CNI+SIGINT


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)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]