On Mon, 2004-06-21 at 04:27, Josselin Mouette wrote: > > > Needs to just write to a pipe or something to wake up the mainloop and > > do the reload there... I'm trying to think of a program with an example > > of this, dbus-daemon does it but that doesn't use GMainLoop. > > An example would be appreciated.
I can give you the basic idea anyway: - on startup, create a pipe - on the read end of the pipe, set up a GLib main loop IO watch - in the signal handler, write one byte to the pipe - in the IO watch handler, read one byte, then reload the configuration; or to be extra cool, queue an idle that reloads the configuration, which will help compress multiple reload requests > > Factory defaults should be changed in packages by patching the .schemas > > file. > > I've already been told not to do that, but that's what Debian are > usually doing. However, if the system administrator wants to change > these defaults, he has to run gconftool again. Right, but the sysadmin will be modifying local configuration, local configuration goes in /etc > Furthermore, the defaults are generated automatically by gconftool from > the schemas, and this generation takes place in /etc, which is very bad. > This has to go to /var/lib. Maybe an additional schemas-only source could go in /var/lib, but I don't think gconf.xml.defaults (which is modified by the local admin) should go in /var/lib. gconf.xml.defaults contains configuration made by the local admin. > > If we have to make a change here I'd add a "schemas" source that's read > > before the "defaults" source, and leave "defaults" in /etc > > Why should it be read before? Shouldn't defaults set by the system > administrators be read before defaults introduced by the schemas? By "read before" I'm assuming "the last thing read wins" > > That isn't the case I don't think. The admin default is /foo/bar. The > > schema default is stored in the schema object at /schemas/foo/bar. The > > package should not touch the admin default. > > But gconftool already creates %gconf.xml files in > /etc/gconf/gconf.xml.defaults. Managing these files for both > schema->default generation and administration is a nightmare. If you want to split sysadmin changes from schemas, that makes sense. But moving gconf.xml.defaults to /var/lib isn't the way to do that. Havoc

