Signed-off-by: Lei Jitang <leijitang@huawei.com>
| ... | ... |
@@ -8,6 +8,7 @@ import ( |
| 8 | 8 |
"os" |
| 9 | 9 |
"path/filepath" |
| 10 | 10 |
goruntime "runtime" |
| 11 |
+ "strings" |
|
| 11 | 12 |
"time" |
| 12 | 13 |
|
| 13 | 14 |
containerd "github.com/docker/containerd/api/grpc/types" |
| ... | ... |
@@ -86,6 +87,9 @@ func (p *process) sendCloseStdin() error {
|
| 86 | 86 |
Pid: p.friendlyName, |
| 87 | 87 |
CloseStdin: true, |
| 88 | 88 |
}) |
| 89 |
+ if err != nil && (strings.Contains(err.Error(), "container not found") || strings.Contains(err.Error(), "process not found")) {
|
|
| 90 |
+ return nil |
|
| 91 |
+ } |
|
| 89 | 92 |
return err |
| 90 | 93 |
} |
| 91 | 94 |
|