server: still update status on container not found in runc
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
358dac96d4
commit
6622feb480
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue