Ai
1 Star 0 Fork 49

htpeng/iSulad

forked from src-openEuler/iSulad
关闭
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0030-Refine-as-others-feedback.patch 1.57 KB
一键复制 编辑 原始数据 按行查看 历史
From 4900996ca52e46795eb25b05ce50519c7c71ae38 Mon Sep 17 00:00:00 2001
From: sailorvii <chenw66@chinaunicom.cn>
Date: Thu, 2 Mar 2023 09:04:57 +0000
Subject: [PATCH 30/53] Refine as others' feedback.
---
src/daemon/modules/runtime/isula/isula_rt_ops.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/daemon/modules/runtime/isula/isula_rt_ops.c b/src/daemon/modules/runtime/isula/isula_rt_ops.c
index 5d622515..7ec3fc49 100644
--- a/src/daemon/modules/runtime/isula/isula_rt_ops.c
+++ b/src/daemon/modules/runtime/isula/isula_rt_ops.c
@@ -473,6 +473,12 @@ static void runtime_exec_func(void *arg)
_exit(EXIT_FAILURE);
}
+ // clear NOTIFY_SOCKET from the env to adapt runc start
+ if (strcmp(rei->subcmd, "start") == 0 && unsetenv("NOTIFY_SOCKET") != 0) {
+ dprintf(STDERR_FILENO, "unset env NOTIFY_SOCKET failed %s", strerror(errno));
+ _exit(EXIT_FAILURE);
+ }
+
execvp(rei->cmd, rei->params);
dprintf(STDERR_FILENO, "exec %s %s %s failed", rei->cmd, rei->subcmd, rei->id);
_exit(EXIT_FAILURE);
@@ -994,11 +1000,6 @@ int rt_isula_start(const char *id, const char *runtime, const rt_start_params_t
pid_info->ppid = shim_pid;
pid_info->pstart_time = p_proc->start_time;
- // clear NOTIFY_SOCKET from the env to adapt runc start
- if (unsetenv("NOTIFY_SOCKET") != 0) {
- ERROR("%s: unset env NOTIFY_SOCKET failed %s", id);
- }
-
if (runtime_call_simple(workdir, runtime, "start", NULL, 0, id, NULL) != 0) {
ERROR("call runtime start id failed");
goto out;
--
2.25.1
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/htpeng/iSulad.git
git@gitee.com:htpeng/iSulad.git
htpeng
iSulad
iSulad
master

搜索帮助