From 6c84b5994ab0d3bbd9d1a7210c97cdf7084bb3fa Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Tue, 12 Dec 2017 21:05:39 +0100 Subject: [PATCH] tools: exit success when lxc-execute is daemonized The error_num value doesn't tell us anything since the container hasn't exited. Signed-off-by: Christian Brauner --- src/lxc/tools/lxc_execute.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/lxc/tools/lxc_execute.c b/src/lxc/tools/lxc_execute.c index f94393e14..7a94cc4bb 100644 --- a/src/lxc/tools/lxc_execute.c +++ b/src/lxc/tools/lxc_execute.c @@ -191,7 +191,10 @@ int main(int argc, char *argv[]) c->daemonize = my_args.daemonize == 1; bret = c->start(c, 1, my_args.argv); - ret = c->error_num; + if (c->daemonize) + ret = EXIT_SUCCESS; + else + ret = c->error_num; lxc_container_put(c); if (!bret) { fprintf(stderr, "Failed run an application inside container\n");