Unix signals in GLib



I'm writing for comments. Making my daemons (upower, PackageKit, etc)
quit nicely after receiving SIGTERM or SIGINT is _really_ hard to do
correctly. The fact that I can only do a few things (write, etc) in
the signal handler makes otherwise quite nice GLib code very quickly
descend into l33t UNIX #ifdef code which is quite unportable and
really hard to get right.

Would there be any interest in providing these features in Glib? Some
work appears to have been done already here
http://www.knitter.ch/src/gunixsignal/ although would obviously need a
lot of work before being even close to proposing. I appreciate this is
UNIX only, but I'm sure for other OS's (WIN32) we can just do nothing
for these functions. Comments?

Richard.


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