diff --git a/src/lxc/tools/lxc_stop.c b/src/lxc/tools/lxc_stop.c index 498aac10a..d87ed16e1 100644 --- a/src/lxc/tools/lxc_stop.c +++ b/src/lxc/tools/lxc_stop.c @@ -226,7 +226,10 @@ int main(int argc, char *argv[]) if (!c->is_running(c)) { fprintf(stderr, "%s is not running\n", c->name); - ret = EXIT_FAILURE; + /* Per our manpage we need to exit with exit code: + * 2: The specified container exists but was not running. + */ + ret = 2; goto out; }