Re: Unix signals in GLib

On Fri, 2010-04-30 at 09:18 +0100, Richard Hughes wrote:
> 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.

Can't you just signal your mainloop to quit from the signal handler, and
do the heavyweight work from there ?


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