|
|
b677e7 |
From e8904b5b7957bfc9328f1ab8b6851c7b0d8920c9 Mon Sep 17 00:00:00 2001
|
|
|
b677e7 |
From: Lennart Poettering <lennart@poettering.net>
|
|
|
b677e7 |
Date: Mon, 23 Nov 2020 11:39:40 +0100
|
|
|
b677e7 |
Subject: [PATCH] sd-event: mention that two debug logged events are ignored
|
|
|
b677e7 |
|
|
|
b677e7 |
(cherry picked from commit f80a5d6a86dc2346f406ee086ba179879afaab70)
|
|
|
b677e7 |
|
|
|
b677e7 |
Related: #1819868
|
|
|
b677e7 |
---
|
|
|
b677e7 |
src/libsystemd/sd-event/sd-event.c | 7 ++-----
|
|
|
b677e7 |
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
b677e7 |
|
|
|
b677e7 |
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c
|
|
|
b677e7 |
index df5ed0dce8..0f507f18d8 100644
|
|
|
b677e7 |
--- a/src/libsystemd/sd-event/sd-event.c
|
|
|
b677e7 |
+++ b/src/libsystemd/sd-event/sd-event.c
|
|
|
b677e7 |
@@ -596,8 +596,6 @@ static bool event_pid_changed(sd_event *e) {
|
|
|
b677e7 |
}
|
|
|
b677e7 |
|
|
|
b677e7 |
static void source_io_unregister(sd_event_source *s) {
|
|
|
b677e7 |
- int r;
|
|
|
b677e7 |
-
|
|
|
b677e7 |
assert(s);
|
|
|
b677e7 |
assert(s->type == SOURCE_IO);
|
|
|
b677e7 |
|
|
|
b677e7 |
@@ -607,9 +605,8 @@ static void source_io_unregister(sd_event_source *s) {
|
|
|
b677e7 |
if (!s->io.registered)
|
|
|
b677e7 |
return;
|
|
|
b677e7 |
|
|
|
b677e7 |
- r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL);
|
|
|
b677e7 |
- if (r < 0)
|
|
|
b677e7 |
- log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll: %m",
|
|
|
b677e7 |
+ if (epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL) < 0)
|
|
|
b677e7 |
+ log_debug_errno(errno, "Failed to remove source %s (type %s) from epoll, ignoring: %m",
|
|
|
b677e7 |
strna(s->description), event_source_type_to_string(s->type));
|
|
|
b677e7 |
|
|
|
b677e7 |
s->io.registered = false;
|