Commit 037f33c4 by Christian Brauner Committed by Stéphane Graber

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: 's avatarChristian Brauner <christian.brauner@canonical.com>
parent 45aec6a1
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment