[lxc-users] [PATCH 1/1] lxc_start: return 1 not -1 on error

Serge Hallyn serge.hallyn at ubuntu.com
Mon Apr 7 15:08:24 UTC 2014


So that exit status doesn't show up as 255.

Reported-by: Andrey Khozov <avkhozov at googlemail.com>
Signed-off-by: Serge Hallyn <serge.hallyn at ubuntu.com>
---
 src/lxc/lxc_start.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lxc/lxc_start.c b/src/lxc/lxc_start.c
index d9a5694..157bea9 100644
--- a/src/lxc/lxc_start.c
+++ b/src/lxc/lxc_start.c
@@ -201,7 +201,7 @@ Options :\n\
 
 int main(int argc, char *argv[])
 {
-	int err = -1;
+	int err = 1;
 	struct lxc_conf *conf;
 	char *const *args;
 	char *rcfile = NULL;
@@ -328,7 +328,7 @@ int main(int argc, char *argv[])
 	if (my_args.close_all_fds)
 		c->want_close_all_fds(c, true);
 
-	err = c->start(c, 0, args) ? 0 : -1;
+	err = c->start(c, 0, args) ? 0 : 1;
 out:
 	lxc_container_put(c);
 	return err;
-- 
1.9.1



More information about the lxc-users mailing list