代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From f2f21f4f7a5f0fdf43fa957f0628045ed373a025 Mon Sep 17 00:00:00 2001
From: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Date: Thu, 24 Sep 2020 15:47:09 +0300
Subject: [PATCH 036/108] logging: read all bytes on EOF in event handler
If writing side writes enough bytes to the pipe and closes writing
end then we got both VIR_EVENT_HANDLE_HANGUP and VIR_EVENT_HANDLE_READ
in handler. Currently in this situation handler reads 1024 bytes
and finish reading leaving unread data in pipe.
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
(cherry picked from commit 7c0e1a8631773788a96702252931541290288ef6)
---
src/logging/log_handler.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c
index 3cc197a396..00fca7b653 100644
--- a/src/logging/log_handler.c
+++ b/src/logging/log_handler.c
@@ -138,7 +138,7 @@ virLogHandlerGetLogFileFromWatch(virLogHandlerPtr handler,
static void
virLogHandlerDomainLogFileEvent(int watch,
int fd,
- int events,
+ int events G_GNUC_UNUSED,
void *opaque)
{
virLogHandlerPtr handler = opaque;
@@ -168,14 +168,13 @@ virLogHandlerDomainLogFileEvent(int watch,
virReportSystemError(errno, "%s",
_("Unable to read from log pipe"));
goto error;
+ } else if (len == 0) {
+ goto error;
}
if (virRotatingFileWriterAppend(logfile->file, buf, len) != len)
goto error;
- if (events & VIR_EVENT_HANDLE_HANGUP)
- goto error;
-
cleanup:
virObjectUnlock(handler);
return;
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。