diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-18 15:51:30 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-18 15:51:30 (GMT) |
commit | 0ef76292c5447127dc3fd39d6272f6d88a63d145 (patch) | |
tree | 167e28347f69bcc8db8dfc38f04a01f70f21df2b /util | |
parent | c9c741c88da3cc5e74f0399c3c5c1f0e70163a7a (diff) | |
download | fluxbox-0ef76292c5447127dc3fd39d6272f6d88a63d145.zip fluxbox-0ef76292c5447127dc3fd39d6272f6d88a63d145.tar.bz2 |
changed the way we create the '~/.fluxbox' directory to avoid race conditions
before bringing up the first instance of Fluxbox we prepare the directory
and the files it needs. if the config version of exiting files is lower
than what we expect, we upgrade the config files. after that we bring
up Fluxbox.
the old way was problematic because setupConfigFiles() calls
'fluxbox-update_configs' which does its job in the background while
fluxbox continues to boot. 'fluxbox-update_configs' sends a USR2 signal
to the booting fluxbox (it might even be finished, no one knows) which
triggers 'load_rc()' which triggered 'setupConfigFiles()' again which
might trigger 'fluxbox-update_configs' again (on my machine
'fluxbox-update_configs' was called 3 times and left a pretty crippled
'keys' file when it was done).
bootstrapping before bringing up fluxbox resolves the issue. as a bonus:
no need to send USR2 to fluxbox to reload the config file because fluxbox
has not even tried to read it yet.
Diffstat (limited to 'util')
-rw-r--r-- | util/fluxbox-update_configs.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/util/fluxbox-update_configs.cc b/util/fluxbox-update_configs.cc index 292fe92..39539f8 100644 --- a/util/fluxbox-update_configs.cc +++ b/util/fluxbox-update_configs.cc | |||
@@ -563,7 +563,7 @@ int run_updates(int old_version, FbTk::ResourceManager &rm) { | |||
563 | string appsfilename = FbTk::StringUtil::expandFilename(*rc_appsfile); | 563 | string appsfilename = FbTk::StringUtil::expandFilename(*rc_appsfile); |
564 | string keyfilename = FbTk::StringUtil::expandFilename(*rc_keyfile); | 564 | string keyfilename = FbTk::StringUtil::expandFilename(*rc_keyfile); |
565 | 565 | ||
566 | size_t i; | 566 | int i; |
567 | for (i = 0; i < sizeof(UPDATES) / sizeof(Update); ++i) { | 567 | for (i = 0; i < sizeof(UPDATES) / sizeof(Update); ++i) { |
568 | if (old_version < UPDATES[i].version) { | 568 | if (old_version < UPDATES[i].version) { |
569 | UPDATES[i].update(rm, keyfilename, appsfilename); | 569 | UPDATES[i].update(rm, keyfilename, appsfilename); |