代码拉取完成,页面将自动刷新
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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。