From 404f08d341c6fcd5f28664902adefd069f2082cd Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 11 Nov 2015 12:57:40 +0100 Subject: [PATCH] systemctl: add a comment that clarifies why we do "return r" at the end of main() To avoid confusion as outlined in #1845. --- src/systemctl/systemctl.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c index 0c42766..616ede8 100644 --- a/src/systemctl/systemctl.c +++ b/src/systemctl/systemctl.c @@ -7709,5 +7709,7 @@ finish: release_busses(); + /* Note that we return r here, not EXIT_SUCCESS, so that we can implement the LSB-like return codes */ + return r < 0 ? EXIT_FAILURE : r; } -- 2.7.4