all repos — fluxbox @ f9df3ffedafe4ee36a74949958527ecc0c23c841

custom fork of the fluxbox windowmanager

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
commit

f9df3ffedafe4ee36a74949958527ecc0c23c841

parent

b104d9e4d0fab70dd5bd3119e2808cd3fb02bffa

1 files changed, 11 insertions(+), 0 deletions(-)

jump to
M src/main.ccsrc/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(); } }