代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 5122e578df1760c5e576682e3f84a1d18dbfca5d Mon Sep 17 00:00:00 2001
From: Xu Chao <xu.chao6@zte.com.cn>
Date: Wed, 24 Nov 2021 10:33:11 +0800
Subject: [PATCH 104/108] util: virExec may blocked by reading pipe if
grandchild prematurely exit
When VIR_EXEC_DAEMON is set, if virPidFileAcquirePath/virSetInherit failed,
then pipesync[0] can not be closed when granchild process exit, because
pipesync[1] still opened in child process. and then saferead in child
process may blocked forever, and left grandchild process in defunct state.
Signed-off-by: Xu Chao <xu.chao6@zte.com.cn>
Signed-off-by: Yi Wang <wang.yi59@zte.com.cn>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 6fac961b085af51340246bf51205a9f2f1615962)
---
src/util/vircommand.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/util/vircommand.c b/src/util/vircommand.c
index 8ab83cb8f5..bb824bf60f 100644
--- a/src/util/vircommand.c
+++ b/src/util/vircommand.c
@@ -775,6 +775,10 @@ virExec(virCommandPtr cmd)
}
if (pid > 0) {
+ /* At this point it's us and the child that holds the write end of
+ * the pipe open. Close the write end of the pipe, so that the pipe
+ * is fully closed if child dies prematurely. */
+ VIR_FORCE_CLOSE(pipesync[1]);
/* The parent expect us to have written the pid file before
* exiting. Wait here for the child to write it and signal us. */
if (cmd->pidfile &&
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。