From 97df060588e4d328a7e219107553087149a77bac Mon Sep 17 00:00:00 2001 From: John Ericson Date: Thu, 22 Jun 2023 14:23:25 -0400 Subject: Better document build failure exit codes - Improved API docs from comment - Exit codes are for `nix-build`, not just `nix-store --release` - Make note in tests so the magic numbers are not surprising Picking up where #8387 left off. --- src/libstore/build/worker.cc | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'src/libstore/build/worker.cc') diff --git a/src/libstore/build/worker.cc b/src/libstore/build/worker.cc index ee334d54a..a9ca9cbbc 100644 --- a/src/libstore/build/worker.cc +++ b/src/libstore/build/worker.cc @@ -468,16 +468,9 @@ void Worker::waitForInput() } -unsigned int Worker::exitStatus() +unsigned int Worker::failingExitStatus() { - /* - * 1100100 - * ^^^^ - * |||`- timeout - * ||`-- output hash mismatch - * |`--- build failure - * `---- not deterministic - */ + // See API docs in header for explanation unsigned int mask = 0; bool buildFailure = permanentFailure || timedOut || hashMismatch; if (buildFailure) -- cgit v1.2.3