sync the copied config files to disk before continuing otherwise a race condition might appear between copying the default config files to .fluxbox/ and executing 'fluxbox-update_configs'. under macosx this lead to 'fluxbox hangs'.
Mathias Gumz akira at fluxbox dot org
1 files changed,
11 insertions(+),
0 deletions(-)
jump to
M
src/main.cc
→
src/main.cc
@@ -52,6 +52,10 @@ #else
#include <string.h> #endif +#ifdef HAVE_UNISTD_H + #include <unistd.h> +#endif + #ifdef HAVE_SYS_STAT_H #include <sys/types.h> #include <sys/stat.h>@@ -365,13 +369,19 @@ return;
} } + bool sync_fs = false; + // copy default files if needed for (size_t i = 0; i < nr_of_cfiles; ++i) { if (cfiles[i].create_file) { FbTk::FileUtil::copyFile(cfiles[i].default_name, cfiles[i].filename.c_str()); + sync_fs = true; } } + if (sync_fs) { + sync(); + } }@@ -408,6 +418,7 @@ fbdbg << "running '"
<< commandargs << "' failed." << endl; } + sync(); } }