9 Star 5 Fork 47

src-openEuler/iSulad

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0093-change-fork-process-exit-mode.patch 1.71 KB
一键复制 编辑 原始数据 按行查看 历史
zhongtao 提交于 2024-06-11 19:55 +08:00 . code improve and bugfix
From 0ff5a421e31096fbd10cf00c45a3849297023391 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Thu, 23 May 2024 01:09:41 +1400
Subject: [PATCH 093/108] change fork process exit mode
---
src/utils/tar/util_archive.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/utils/tar/util_archive.c b/src/utils/tar/util_archive.c
index 52b51162..204dab83 100644
--- a/src/utils/tar/util_archive.c
+++ b/src/utils/tar/util_archive.c
@@ -897,9 +897,9 @@ int archive_unpack(const struct io_read_wrapper *content, const char *dstdir, co
child_out:
if (ret != 0) {
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
}
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
close(pipe_stderr[1]);
pipe_stderr[1] = -1;
@@ -1342,9 +1342,9 @@ int archive_chroot_tar(const char *path, const char *file, const char *root_dir,
child_out:
if (ret != 0) {
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
} else {
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
}
close(pipe_for_read[1]);
@@ -1577,9 +1577,9 @@ int archive_chroot_untar_stream(const struct io_read_wrapper *context, const cha
child_out:
if (ret != 0) {
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
}
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
close(pipe_stderr[1]);
@@ -1727,9 +1727,9 @@ child_out:
free(tar_base_name);
if (ret != 0) {
- exit(EXIT_FAILURE);
+ _exit(EXIT_FAILURE);
} else {
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
}
--
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

搜索帮助