diff options
-rw-r--r-- | bbot/worker/worker.cxx | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx index 8994e3f..8e4ec3a 100644 --- a/bbot/worker/worker.cxx +++ b/bbot/worker/worker.cxx @@ -4,7 +4,7 @@ #ifndef _WIN32 # include <signal.h> // signal() #else -# include <libbutl/win32-utility.hxx> +# include <libbutl/win32-utility.hxx> // SetErrorMode(), Sleep() #endif #include <map> @@ -2206,6 +2206,16 @@ build (size_t argc, const char* argv[]) rm.status |= r.status; } +#ifdef _WIN32 + // Give Windows a chance to (presumably) scan any files we may have just + // unpacked. Failed that, if we try to overwrite any such file (e.g., a + // generated header) we may end up with a permission denied error. Note + // also that this is in addition to the 2 seconds retry we have in our + // fdopen() implementation, which is not always enough. + // + Sleep (5000); +#endif + // Update the main package. // { @@ -3091,6 +3101,10 @@ build (size_t argc, const char* argv[]) break; } +#ifdef _WIN32 + Sleep (5000); // See above. +#endif + // Run external runtime tests. // if (has_runtime_tests) |