代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/systemd 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From 4029328014be9350ca9fc0774ad936c8b5e50ff2 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
Date: Sun, 13 Mar 2022 21:22:57 +0900
Subject: [PATCH] udev: remove /run/udev/queue in on_post()
When the last queued event is processed, information about subsequent
events may be already queued in the netlink socket of sd-device-monitor.
In that case, previously we once removed /run/udev/queue and touch the
file soon later, and `udevadm settle` mistakenly considered all events
are processed.
To mitigate such situation, this makes /run/udev/queue removed in on_post().
Reference:https://github.com/systemd/systemd/commit/4029328014be9350ca9fc0774ad936c8b5e50ff2
Conflict:NA
---
src/udev/udevd.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/src/udev/udevd.c b/src/udev/udevd.c
index 6bb9eeb4bb37..8389c39f652f 100644
--- a/src/udev/udevd.c
+++ b/src/udev/udevd.c
@@ -171,12 +171,6 @@ static Event *event_free(Event *event) {
if (event->worker)
event->worker->event = NULL;
- /* only clean up the queue from the process that created it */
- if (LIST_IS_EMPTY(event->manager->events) &&
- event->manager->pid == getpid_cached())
- if (unlink("/run/udev/queue") < 0 && errno != ENOENT)
- log_warning_errno(errno, "Failed to unlink /run/udev/queue, ignoring: %m");
-
return mfree(event);
}
@@ -1480,7 +1474,13 @@ static int on_post(sd_event_source *s, void *userdata) {
if (!LIST_IS_EMPTY(manager->events))
return 1;
- /* There are no pending events. Let's cleanup idle process. */
+ /* There are no queued events. Let's remove /run/udev/queue and clean up the idle processes. */
+
+ if (unlink("/run/udev/queue") < 0) {
+ if (errno != ENOENT)
+ log_warning_errno(errno, "Failed to unlink /run/udev/queue, ignoring: %m");
+ } else
+ log_debug("No events are queued, removing /run/udev/queue.");
if (!hashmap_isempty(manager->workers)) {
/* There are idle workers */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。