Ignore running containers in ps exit-code filters

Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
Matthew Heon
2018-07-13 10:34:25 -04:00
parent 028374b99e
commit d25ebcc35b

View File

@ -324,8 +324,8 @@ func generateContainerFilterFuncs(filter, filterValue string, runtime *libpod.Ru
return nil, errors.Wrapf(err, "exited code out of range %q", filterValue)
}
return func(c *libpod.Container) bool {
ec, _, err := c.ExitCode()
if ec == int32(exitCode) && err == nil {
ec, exited, err := c.ExitCode()
if ec == int32(exitCode) && err == nil && exited == true {
return true
}
return false