Handling Unix signals in a GTK+ application



I would like to catch SIGINT in my GTK+ application,
to do a graceful exit. I was looking for the GTK+
equivalent of XtNoticeSignal(), but I guess there
isn't one; when I searched the archive, all I found
was some mention of a proposed GLib extension called
g_signal_notify() -- which looks like what I'm looking
for, but the thread in question is 6 years old and
nothing seems to have come of it.
I read a few articles discussing the use of a pipe,
with an input source to handle the "noticing the
event" bit within the main loop. It seems like a
kludge, but I suppose it's workable... Is this still
the recommended approach? (I notice the GTK
documentation is utterly silent on the whole topic.)

Thanks!

 - Thomas

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]