From 06b8d8aca4eab8c77fae03c4ccd6b248a97c5258 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 21 May 2019 11:54:11 +0200 Subject: Temporarily instrument BLODA with shorter timeout and extra diagnostics --- libbutl/process.cxx | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/libbutl/process.cxx b/libbutl/process.cxx index 3db4edc..3aa4ebc 100644 --- a/libbutl/process.cxx +++ b/libbutl/process.cxx @@ -105,6 +105,11 @@ #include // milli #include // __argv[] #include // find() + +//@@ TMP +#include +#include // std::terminate() + #endif #endif @@ -1753,7 +1758,12 @@ namespace butl using namespace chrono; - for (system_clock::duration timeout (1h);;) // Try for about 1 hour. + + //@@ TMP + system_clock::duration timeout (5min); + for (size_t i (0);; ++i) + + //for (system_clock::duration timeout (1h);;) // Retry for about 1 hour. { if (!CreateProcess ( batch ? batch->c_str () : pp.effect_string (), @@ -1885,6 +1895,13 @@ namespace butl il.lock (); continue; } + else //@@ TMP + { + cerr << "failed to start " << pp.effect_string () << " after " + << i << " attempts" << endl; + + std::terminate (); + } } } -- cgit v1.1