代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 1cdbc7c47200b9ffc1911656567b48f53f4107b8 Mon Sep 17 00:00:00 2001
From: jiangheng12 <jiangheng14@huawei.com>
Date: Wed, 26 Apr 2023 19:34:58 +0800
Subject: [PATCH] dfx: set g_unix_fd to -1 after abnormal close fd to avoid
double close
---
src/ltran/ltran_dfx.c | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 3513125..4baca26 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -289,6 +289,7 @@ static int32_t dfx_stat_read_from_ltran(char *buf, uint32_t len, enum GAZELLE_ST
dfx = find_dfx_node(mode);
if (dfx == NULL) {
close(fd);
+ g_unix_fd = -1;
return GAZELLE_ERR;
}
@@ -297,6 +298,7 @@ static int32_t dfx_stat_read_from_ltran(char *buf, uint32_t len, enum GAZELLE_ST
if (ret == -1) {
printf("read stat response msg failed ret=%d\n", ret);
close(fd);
+ g_unix_fd = -1;
return GAZELLE_ERR;
}
}
@@ -1368,16 +1370,16 @@ int32_t main(int32_t argc, char *argv[])
int unix_arg = 0;
for (int32_t i = 1; i < argc; i++) {
- if (unix_arg == 0) {
- if (!strcmp(argv[i], "-u")) {
- unix_arg++;
- }
- } else if (unix_arg == 1) {
- g_unix_prefix = argv[i];
- unix_arg++;
- } else {
- argv[i - unix_arg] = argv[i];
- }
+ if (unix_arg == 0) {
+ if (!strcmp(argv[i], "-u")) {
+ unix_arg++;
+ }
+ } else if (unix_arg == 1) {
+ g_unix_prefix = argv[i];
+ unix_arg++;
+ } else {
+ argv[i - unix_arg] = argv[i];
+ }
}
argv[argc - unix_arg] = argv[argc];
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。