dcavalca / rpms / systemd

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