_dbus_loop_iterate: if the kernel says a fd is bad, stop watching it
authorSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 12 Jan 2011 12:14:49 +0000 (12:14 +0000)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Fri, 21 Jan 2011 15:01:37 +0000 (15:01 +0000)
commit460e6282d68a928a78f16031ed1637bc7676e10e
tree61214b7e3776473d6730cacac061d16f210aa1aa
parentf3ed53a30f77cc0c87cf469857263bb9682acd9a
_dbus_loop_iterate: if the kernel says a fd is bad, stop watching it

Again, this shouldn't happen - modules are responsible for cleaning up
their watches - but the failure mode here is really bad: if we leave an
invalid fd in the set, every poll() call will instantly return, marking
it as POLLNVAL. The result is that dbus-daemon busy-loops on poll()
without responding to I/O, so the bad watch will probably never be
cleared up.

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=32992
Bug-NB: NB#200248
Reviewed-by: Colin Walters <walters@verbum.org>
dbus/dbus-mainloop.c