diff --git a/oci/oci.go b/oci/oci.go index bd3cac3b..85841f1d 100644 --- a/oci/oci.go +++ b/oci/oci.go @@ -521,6 +521,9 @@ func (r *Runtime) UpdateStatus(c *Container) error { out, err := exec.Command(r.Path(c), "state", c.name).CombinedOutput() if err != nil { if err := unix.Kill(c.state.Pid, 0); err == syscall.ESRCH { + c.state.Status = ContainerStateStopped + c.state.Finished = time.Now() + c.state.ExitCode = 255 return nil } return fmt.Errorf("error getting container state for %s: %s: %q", c.name, err, out)