9 Star 5 Fork 47

src-openEuler/iSulad

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0074-bugfix-of-background-execution-exec-error-command.patch 1.46 KB
一键复制 编辑 原始数据 按行查看 历史
From 2c86e55d98b0d62c534ff5810c1eb1d327d6425a Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 23 Apr 2024 17:44:00 +1400
Subject: [PATCH 74/75] bugfix of background execution exec error command
Signed-off-by: zhongtao <zhongtao17@huawei.com>
---
src/daemon/modules/runtime/isula/isula_rt_ops.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
index 47a14b1d..854752ea 100644
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
@@ -1099,6 +1099,15 @@ static int get_container_process_pid(const char *workdir)
util_usleep_nointerupt(100000);
continue;
}
+ // If isulad does not read the container process pid, but isulad-shim reads the pid,
+ // and the container process exits, isulad-shim exits accordingly.
+ // At this time, exec should return true, because the container process has been created successfully
+ // and exec is successful, just because The process executes too fast causing isulad to not be read correctly
+ file_read_int(fname, &pid);
+ if (pid != 0) {
+ DEBUG("Process exit and isulad-shim exit");
+ return pid;
+ }
ERROR("failed read pid from dead shim %s", workdir);
return -1;
}
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/src-openeuler/iSulad.git
git@gitee.com:src-openeuler/iSulad.git
src-openeuler
iSulad
iSulad
master

搜索帮助