sd-event: improve debug message when we fail to remove and fd from an epoll

Let's help users to debug issues with epoll fd removal by printing the
name of the event source.
This commit is contained in:
Lennart Poettering
2015-08-31 13:20:44 +02:00
parent 324496eb25
commit 556c25cf8c
+2 -1
View File
@@ -481,7 +481,8 @@ static void source_io_unregister(sd_event_source *s) {
return;
r = epoll_ctl(s->event->epoll_fd, EPOLL_CTL_DEL, s->io.fd, NULL);
assert_log(r >= 0);
if (r < 0)
log_debug_errno(errno, "Failed to remove source %s from epoll: %m", strna(s->description));
s->io.registered = false;
}