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]

Re: threads+CNI+SIGINT


Oskar Liljeblad wrote:
> If I initialize ncurses natively in some object, I need to either
> have the user manually restore the terminal, or do it during
> finalization. I prefer the latter because it is easy to write buggy
> code that never cleans up. (But it is also easy to write code that
> always cleans up - except if the program wa killed by SIGINT/SIGTERM.)

Don't use finalization for this.  Handling SIGINT is a problem that Java
doesn't solve, unfortunately... I've seen enhancement requests for
portable signal handling on JDC but I don't recall if they ever made it
into the core API (maybe in 1.3, I haven't looked).

In a native CNI method, what signal handlers (if any) can I safely
install?  Some signals are reserved by boehm-gc and linuxthreads.  Is
this documented?  (I know, I'm too lazy/time-crunched to go look for
myself.)

-- 
Jeff Sturm
jsturm@sigma6.com

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