diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-08-31 13:07:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-08-31 13:20:44 +0200 |
commit | 556c25cf8c1250cb529c9a95e3b20b6f4d19ffc2 (patch) | |
tree | 95a4390a44ccadd12b563b9e54070ff252cad862 /src | |
parent | 324496eb25b51395a00430b28fac639502df9e3e (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/libsystemd/sd-event/sd-event.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsystemd/sd-event/sd-event.c b/src/libsystemd/sd-event/sd-event.c index 0e33ced342..c419be820a 100644 --- a/src/libsystemd/sd-event/sd-event.c +++ b/src/libsystemd/sd-event/sd-event.c @@ -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; } |