Browse code

exited=0 in filter shouldn't show "Created" ones

Newly created containers which are not started yet should not list
when "exited=0" filter is used with "ps -a"

Signed-off-by: Boynux <boynux@gmail.com>

boynux authored on 2016/04/12 06:44:05
Showing 1 changed files
... ...
@@ -312,7 +312,7 @@ func includeContainerInList(container *container.Container, ctx *listContext) it
312 312
 	if len(ctx.exitAllowed) > 0 {
313 313
 		shouldSkip := true
314 314
 		for _, code := range ctx.exitAllowed {
315
-			if code == container.ExitCode && !container.Running {
315
+			if code == container.ExitCode && !container.Running && !container.StartedAt.IsZero() {
316 316
 				shouldSkip = false
317 317
 				break
318 318
 			}