1 Star 0 Fork 49

李双全/systemd

forked from src-anolis-os/systemd 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0426-core-fix-the-return-value-in-order-to-make-sure-we-d.patch 993 Bytes
一键复制 编辑 原始数据 按行查看 历史
geliwei 提交于 2021-06-16 16:46 . update to systemd-239-45.el8.src.rpm
From 4da9dfaec0d7d232d8bfed0d7f65afd65369bc8c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michal=20Sekleta=CC=81r?= <msekleta@redhat.com>
Date: Fri, 5 Jun 2020 15:23:12 +0200
Subject: [PATCH] core: fix the return value in order to make sure we don't
dipatch method return too early
Actually, it is the same kind of problem as in d910f4c . Basically, we
need to return 1 on success code path in slice_freezer_action().
Otherwise we dispatch DBus return message too soon.
Fixes: #16050
(cherry picked from commit 2884836e3c26fa76718319cdc6d13136bbc1354d)
Related: #1830861
---
src/core/slice.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/slice.c b/src/core/slice.c
index b5eb2f5c01..c10e830917 100644
--- a/src/core/slice.c
+++ b/src/core/slice.c
@@ -399,7 +399,7 @@ static int slice_freezer_action(Unit *s, FreezerAction action) {
if (r < 0)
return r;
- return 0;
+ return 1;
}
static int slice_freeze(Unit *s) {
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/shqli/systemd.git
git@gitee.com:shqli/systemd.git
shqli
systemd
systemd
a8

搜索帮助

0d507c66 1850385 C8b1a773 1850385