mirror of
https://github.com/containers/podman
synced 2024-10-21 09:45:32 +00:00
If a container ceases to exist in runc, set exit status
When we scan a container in runc and see that it no longer exists, we already set ContainerStatusExited to indicate that it no longer exists in runc. Now, also set an exit code and exit time, so PS output will make some sense. Signed-off-by: Matthew Heon <matthew.heon@gmail.com>
This commit is contained in:
parent
140f87c474
commit
94763a47a6
|
@ -508,6 +508,8 @@ func (r *OCIRuntime) updateContainerStatus(ctr *Container, useRunc bool) error {
|
|||
}
|
||||
if strings.Contains(string(out), "does not exist") {
|
||||
ctr.removeConmonFiles()
|
||||
ctr.state.ExitCode = -1
|
||||
ctr.state.FinishedTime = time.Now()
|
||||
ctr.state.State = ContainerStateExited
|
||||
return nil
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue