From: Christian Brauner Date: Sun, 30 Oct 2016 17:24:15 +0000 (+0100) Subject: tools: use correct exit code for lxc-stop X-Git-Tag: lxc-1.0.9~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5eb8b13018f85860da5efcae40cadc735fbcbf22;p=thirdparty%2Flxc.git tools: use correct exit code for lxc-stop When the container is already running our manpage promises to exit with 2. Let's make it so. Signed-off-by: Christian Brauner --- diff --git a/src/lxc/lxc_stop.c b/src/lxc/lxc_stop.c index 10ddce6a9..78a483efb 100644 --- a/src/lxc/lxc_stop.c +++ b/src/lxc/lxc_stop.c @@ -210,6 +210,9 @@ int main(int argc, char *argv[]) if (!c->is_running(c)) { fprintf(stderr, "%s is not running\n", c->name); + /* Per our manpage we need to exit with exit code: + * 2: The specified container exists but was not running. + */ ret = 2; goto out; }