GNOME Bugzilla – Bug 655424
Provide a graceful restart for dconf-service
Last modified: 2011-09-11 18:50:21 UTC
I discussed the "killall dconf-service" recommendation in the NEWS entry for 0.9 on opensuse-packaging, and people don't like that :-) See http://lists.opensuse.org/opensuse-packaging/2011-07/msg00110.html The best consensus so far seems to be that "killall -SIGHUP dconf-service" would be fine. We just need dconf-service to handle that signal :-)
I intend to provide a graceful dconf shutdown via SIGTERM. SIGHUP is inappropriate, since typically you expect SIGHUP does not end the process. In the case of dconf, the correct thing is to end the process. That's SIGTERM. It's true that SIGTERM can currently result in data loss if writes are actively in progress -- in the future, SIGTERM will be more graceful. This all goes back to freedesktop #11454 ( https://bugs.freedesktop.org/show_bug.cgi?id=11454 ), however...
SIGHUP is typically used to tell a daemon that it should restart itself, see http://en.wikipedia.org/wiki/SIGHUP#Modern_usage One issue with SIGTERM is that there could be another process called dconf-service that will be affected by the killall, and that doesn't deal with SIGTERM correctly.
dconf is not intended to restart itself. It is intended that it will exit so that D-Bus will (maybe) restart it automatically later. That's TERM, not HUP. Also, by default, HUP is just as deadly as TERM. That means that if there is another process called dconf-service that is not dconf-service and that process is not intercepting signals then it will die equally well with a HUP. I really did think first about using HUP. It seemed inappropriate to me, though.
commit 3ecf9aab99ff201ba66e7d7f6e79accbd6797660 Author: Ryan Lortie <desrt@desrt.ca> Date: Sun Sep 11 14:46:10 2011 -0400 Graceful exit on signal Exit gracefully on receipt of SIGTERM, SIGHUP or SIGINT. Require glib 2.29.90 for the API used to do this.