Make process check more forgiving

Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
Michael Crosby 2017-10-10 15:36:19 -04:00
parent eb68b900bc
commit bfe3058fc9
1 changed files with 4 additions and 6 deletions

View File

@ -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
}