aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bbot/worker/worker.cxx13
1 files changed, 12 insertions, 1 deletions
diff --git a/bbot/worker/worker.cxx b/bbot/worker/worker.cxx
index e07df30..d7027f8 100644
--- a/bbot/worker/worker.cxx
+++ b/bbot/worker/worker.cxx
@@ -1398,7 +1398,11 @@ build (size_t argc, const char* argv[])
}
catch (const system_error& e)
{
- fail << "unable to upload result manifest to " << url << ": " << e;
+ // We use exit code 3 to signal an unsuccessful attempt to upload the
+ // result manifest. See startup() for details.
+ //
+ error << "unable to upload result manifest to " << url << ": " << e;
+ return 3;
}
// We use exit code 2 to signal abnormal termination but where we managed
@@ -1541,9 +1545,14 @@ startup ()
// Exit code 2 signals abnormal termination but where the worker uploaded
// the result itself.
//
+ // Exit code 3 signals an unsuccessful attempt by the worker to upload the
+ // result manifest. There is no reason to retry (most likely there is
+ // nobody listening on the other end anymore).
+ //
string tg (tm.target.string ());
switch (run_exit (trace, pp, tg, argv0.effect_string (), os))
{
+ case 3:
case 2: return 1;
case 0: return 0;
default: fail << "process " << pp << " exited with non-zero code" << endf;
@@ -1551,6 +1560,8 @@ startup ()
}
catch (const failed&)
{
+ const string url ("tftp://" + ops.tftp_host () + "/result.manifest");
+
// If we failed before being able to parse the task manifest, use the
// "unknown" values for the package name and version.
//