From 459779bb691f47e10dbe76dcd49e469980fc24f2 Mon Sep 17 00:00:00 2001 From: Paul Eggleton Date: Mon, 13 Feb 2012 11:41:32 +0000 Subject: [PATCH] bitbake/knotty: ensure we return non-zero exit code on Ctrl+C If the user uses Ctrl+C to exit out of the build, then ensure we return a non-zero exit code since the entire build was not completed successfully. If nothing else, this is useful to avoid continuing in the bitbake wrapper script in OE-Core if the initial pseudo build is interrupted. (Bitbake rev: c11eab7fa230f1fd5cc33589f3555b94e95f202d) Signed-off-by: Paul Eggleton Signed-off-by: Richard Purdie --- bitbake/lib/bb/ui/knotty.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bitbake/lib/bb/ui/knotty.py b/bitbake/lib/bb/ui/knotty.py index 22370ef..a0bb127 100644 --- a/bitbake/lib/bb/ui/knotty.py +++ b/bitbake/lib/bb/ui/knotty.py @@ -295,4 +295,9 @@ def main(server, eventHandler): if summary: print(summary) + if shutdown: + print("Execution was interrupted, returning a non-zero exit code.") + if return_value == 0: + return_value = 1 + return return_value -- 2.7.4