代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libvirt 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4e69b1be71fd431614aaf6d69208dabc4d7bf053 Mon Sep 17 00:00:00 2001
From: Tim Wiederhake <twiederh@redhat.com>
Date: Mon, 1 Feb 2021 13:42:01 +0100
Subject: [PATCH 086/108] virsh-domain: Fix error handling of pthread_sigmask
pthread_sigmask() returns 0 on success and "a non-zero value
on failure", but not neccessarily a negative one.
Found by clang-tidy's "bugprone-posix-return" check.
Signed-off-by: Tim Wiederhake <twiederh@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
(cherry picked from commit 4f5c22b27c7580a93d45e7475580b4dd55fd0da5)
---
tools/virsh-domain.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c
index 622972bdd4..49b2ed3a3f 100644
--- a/tools/virsh-domain.c
+++ b/tools/virsh-domain.c
@@ -4238,7 +4238,7 @@ doSave(void *opaque)
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT);
- if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) < 0)
+ if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) != 0)
goto out_sig;
#endif /* !WIN32 */
@@ -4768,7 +4768,7 @@ doManagedsave(void *opaque)
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT);
- if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) < 0)
+ if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) != 0)
goto out_sig;
#endif /* !WIN32 */
@@ -5450,7 +5450,7 @@ doDump(void *opaque)
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT);
- if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) < 0)
+ if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) != 0)
goto out_sig;
#endif /* !WIN32 */
@@ -10740,7 +10740,7 @@ doMigrate(void *opaque)
sigemptyset(&sigmask);
sigaddset(&sigmask, SIGINT);
- if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) < 0)
+ if (pthread_sigmask(SIG_BLOCK, &sigmask, &oldsigmask) != 0)
goto out_sig;
#endif /* !WIN32 */
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。