代码拉取完成,页面将自动刷新
同步操作将从 src-anolis-os/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 62c8e07498c9dd13aa79371fc169bb51652ef3a9 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Mon, 13 Mar 2023 14:31:38 +0100
Subject: [PATCH] journald-server: move relinquish code into function
No functional change, just refactoring.
RHEL-only
Related: #2176892
---
src/journal/journald-server.c | 23 ++++++++++++++++-------
1 file changed, 16 insertions(+), 7 deletions(-)
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
index c72cb68095..aa70db95cc 100644
--- a/src/journal/journald-server.c
+++ b/src/journal/journald-server.c
@@ -1258,20 +1258,16 @@ static int dispatch_sigrtmin1(sd_event_source *es, const struct signalfd_siginfo
return 0;
}
-
-static int dispatch_sigrtmin2(sd_event_source *es, const struct signalfd_siginfo *si, void *userdata) {
- Server *s = userdata;
+static void relinquish_var(Server *s) {
int r;
assert(s);
if (s->storage == STORAGE_NONE)
- return 0;
+ return;
if (s->runtime_journal && !s->system_journal)
- return 0;
-
- log_debug("Received request to relinquish /var from PID " PID_FMT, si->ssi_pid);
+ return;
(void) system_journal_open(s, false, true);
@@ -1286,6 +1282,19 @@ static int dispatch_sigrtmin2(sd_event_source *es, const struct signalfd_siginfo
if (r < 0)
log_warning_errno(r, "Failed to write /run/systemd/journal/relinquished, ignoring: %m");
+ return;
+}
+
+static int dispatch_sigrtmin2(sd_event_source *es, const struct signalfd_siginfo *si, void *userdata) {
+ Server *s = userdata;
+
+ assert(s);
+ assert(si);
+
+ log_debug("Received request to relinquish /var from PID " PID_FMT, si->ssi_pid);
+
+ relinquish_var(s);
+
return 0;
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。