After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 655424 - Provide a graceful restart for dconf-service
Provide a graceful restart for dconf-service
Status: RESOLVED FIXED
Product: dconf
Classification: Core
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: dconf-maint
dconf-maint
Depends on:
Blocks:
 
 
Reported: 2011-07-27 14:23 UTC by Vincent Untz
Modified: 2011-09-11 18:50 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vincent Untz 2011-07-27 14:23:01 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 :-)
Comment 1 Allison Karlitskaya (desrt) 2011-07-28 03:21:05 UTC
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...
Comment 2 Vincent Untz 2011-07-28 06:14:45 UTC
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.
Comment 3 Allison Karlitskaya (desrt) 2011-07-28 09:16:25 UTC
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.
Comment 4 Allison Karlitskaya (desrt) 2011-09-11 18:50:21 UTC
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.