From bfe3058fc995826fca28714c516ff10e9dab5903 Mon Sep 17 00:00:00 2001 From: Michael Crosby Date: Tue, 10 Oct 2017 15:36:19 -0400 Subject: [PATCH] Make process check more forgiving Signed-off-by: Michael Crosby --- libcontainer/container_linux.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index 1d443d19..36f064f0 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -1782,12 +1782,10 @@ func ignoreTerminateErrors(err error) error { if err == nil { return nil } - - // TODO(steve): Update these to none string checks if the runtime exports them. - switch err.Error() { - case "os: process already finished", "exec: Wait was already called": + s := err.Error() + switch { + case strings.Contains(s, "process already finished"), strings.Contains(s, "Wait was already called"): return nil - default: - return err } + return err }