summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthew Heon <mheon@redhat.com>2018-07-13 10:34:25 -0400
committerMatthew Heon <mheon@redhat.com>2018-07-13 14:28:41 -0400
commitd25ebcc35bc59ac536eacf59af978181e6adabd3 (patch)
tree700512fe739e201622c3e3122fa1ea86541a52a0
parent028374b99e5c9dd23236a10495ea0aebe819b51f (diff)
downloadpodman-d25ebcc35bc59ac536eacf59af978181e6adabd3.tar.gz
podman-d25ebcc35bc59ac536eacf59af978181e6adabd3.tar.bz2
podman-d25ebcc35bc59ac536eacf59af978181e6adabd3.zip
Ignore running containers in ps exit-code filters
Signed-off-by: Matthew Heon <mheon@redhat.com>
-rw-r--r--cmd/podman/ps.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 22055b274..a5f417449 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -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