daandemeyer / rpms / systemd

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