conmon: Return the exit status code

waitpid fills its second argument with a value that
contains the process exit code in the 8 least significant
bits. Instead of returning the complete value and then
convert it from ocid, return the exit status directly
by using WEXITSTATUS from conmon.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
This commit is contained in:
Samuel Ortiz 2017-01-10 20:19:01 +01:00
parent 61e60bfe47
commit 9a4a1092fe
No known key found for this signature in database
GPG key ID: 8A803CDD4F566C4A
3 changed files with 5 additions and 8 deletions

View file

@ -335,7 +335,7 @@ func (r *Runtime) UpdateStatus(c *Container) error {
if err != nil {
return fmt.Errorf("status code conversion failed: %v", err)
}
c.state.ExitCode = int32(utils.StatusToExitCode(statusCode))
c.state.ExitCode = int32(statusCode)
}
return nil