The following pull request was submitted through Github. It can be accessed and reviewed at: https://github.com/lxc/go-lxc/pull/101
This e-mail was sent by the LXC bot, direct replies will not reach the author unless they happen to be subscribed to this list. === Description (from pull-request) === runCommandStatus should return correct status codes (use of WEXITSTATUS macro) as lxc-execute does in https://github.com/lxc/lxc/blob/master/src/lxc/tools/lxc_execute.c#L239
From c968017125e4f7dc1bcb439ee0b8bdeb088c175c Mon Sep 17 00:00:00 2001 From: s3rj1k <evasive.gy...@gmail.com> Date: Thu, 24 May 2018 20:20:22 +0300 Subject: [PATCH] fix incorrect status code from runCommandStatus runCommandStatus should return correct status codes (use of WEXITSTATUS macro) as lxc-execute does in https://github.com/lxc/lxc/blob/master/src/lxc/tools/lxc_execute.c#L239 --- container.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/container.go b/container.go index 79bfd2e..daac409 100644 --- a/container.go +++ b/container.go @@ -1282,7 +1282,7 @@ func (c *Container) runCommandStatus(args []string, options AttachOptions) (int, cargs, )) - return ret, nil + return int(uint8(ret >> 8)), nil } // RunCommandStatus attachs a shell and runs the command within the container.
_______________________________________________ lxc-devel mailing list lxc-devel@lists.linuxcontainers.org http://lists.linuxcontainers.org/listinfo/lxc-devel