Re: Unix signals in GLib
- From: Xavier Bestel <xavier bestel free fr>
- To: Richard Hughes <hughsient gmail com>
- Cc: Gtk+ Developers <gtk-devel-list gnome org>
- Subject: Re: Unix signals in GLib
- Date: Fri, 30 Apr 2010 10:23:24 +0200
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 ?
Xav
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]