Skip to content

Commit bfe3058

Browse files
committed
Make process check more forgiving
Signed-off-by: Michael Crosby <[email protected]>
1 parent eb68b90 commit bfe3058

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

libcontainer/container_linux.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1782,12 +1782,10 @@ func ignoreTerminateErrors(err error) error {
17821782
if err == nil {
17831783
return nil
17841784
}
1785-
1786-
// TODO(steve): Update these to none string checks if the runtime exports them.
1787-
switch err.Error() {
1788-
case "os: process already finished", "exec: Wait was already called":
1785+
s := err.Error()
1786+
switch {
1787+
case strings.Contains(s, "process already finished"), strings.Contains(s, "Wait was already called"):
17891788
return nil
1790-
default:
1791-
return err
17921789
}
1790+
return err
17931791
}

0 commit comments

Comments
 (0)