Ignore "failed to close stdin" if container or process not found
Signed-off-by: Lei Jitang <leijitang@huawei.com>
This commit is contained in:
parent
c36c63b308
commit
9aedaf5b3a
1 changed files with 4 additions and 0 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"os"
|
||||
"path/filepath"
|
||||
goruntime "runtime"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
containerd "github.com/docker/containerd/api/grpc/types"
|
||||
|
@ -86,6 +87,9 @@ func (p *process) sendCloseStdin() error {
|
|||
Pid: p.friendlyName,
|
||||
CloseStdin: true,
|
||||
})
|
||||
if err != nil && (strings.Contains(err.Error(), "container not found") || strings.Contains(err.Error(), "process not found")) {
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue