aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2019-05-21 11:54:11 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2019-05-21 11:54:11 +0200
commit06b8d8aca4eab8c77fae03c4ccd6b248a97c5258 (patch)
treef8a684a2319cd53d083590d885104f899265271d
parent8422530a8c2ed42527aee77ff0679f86a17a9a48 (diff)
Temporarily instrument BLODA with shorter timeout and extra diagnostics
-rw-r--r--libbutl/process.cxx19
1 files changed, 18 insertions, 1 deletions
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 <ratio> // milli
#include <cstdlib> // __argv[]
#include <algorithm> // find()
+
+//@@ TMP
+#include <iostream>
+#include <exception> // 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 ();
+ }
}
}