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 <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2017-12-12 21:05:39 +01:00
parent 19bfbf6e94
commit 6c84b5994a
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -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");