aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bpkg/utility.cxx16
1 files changed, 15 insertions, 1 deletions
diff --git a/bpkg/utility.cxx b/bpkg/utility.cxx
index 842a311..06e07a8 100644
--- a/bpkg/utility.cxx
+++ b/bpkg/utility.cxx
@@ -178,8 +178,22 @@ namespace bpkg
process pr (pp, args);
- if (!pr.wait ())
+ if (pr.wait ())
+ return;
+
+ assert (pr.exit);
+ const process_exit& pe (*pr.exit);
+
+ if (pe.normal ())
throw failed (); // Assume the child issued diagnostics.
+
+ diag_record dr (fail);
+ print_process (dr, args);
+
+ dr << " terminated abnormally: " << pe.description ();
+
+ if (pe.core ())
+ dr << " (core dumped)";
}
catch (const process_error& e)
{