runc/patch/0009-runc-ignore-exec.fifo-removing-not-exist-error.patch
2022-11-04 11:42:04 +08:00

29 lines
847 B
Diff

From 13e4ce1748fbf311c01238e03f9314b2c2b4777e Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Mon, 17 Oct 2022 16:33:33 +0800
Subject: [PATCH] runc: ignore exec.fifo removing not exist error
---
runc-1.1.3/libcontainer/container_linux.go | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/runc-1.1.3/libcontainer/container_linux.go b/runc-1.1.3/libcontainer/container_linux.go
index 9df830d..6b68a0e 100644
--- a/runc-1.1.3/libcontainer/container_linux.go
+++ b/runc-1.1.3/libcontainer/container_linux.go
@@ -325,7 +325,10 @@ func handleFifoResult(result openResult) error {
if err := readFromExecFifo(f); err != nil {
return err
}
- return os.Remove(f.Name())
+ if err := os.Remove(f.Name()); !os.IsNotExist(err) {
+ return err
+ }
+ return nil
}
type openResult struct {
--
2.30.0