This makes sure that fd events doesn't dry out,
because a fd with a lower number is busy.
metze
The last 3 patches address bug #7942 (inotify can somehow cause endless loops in
with select()).
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Mon Jan 31 16:59:44 CET 2011 on sn-devel-104
(cherry picked from commit
ad10289ebcc78ab62ec86abb29f81eb769d17f4e)
(cherry picked from commit
3d2f72844a221dbdfe94fbf6e2b45c98ee158a9b)
if (FD_ISSET(fde->fd, write_fds)) flags |= EVENT_FD_WRITE;
if (flags & fde->flags) {
+ DLIST_DEMOTE(ev->fd_events, fde, struct tevent_fd *);
fde->handler(ev, fde, flags, fde->private_data);
return true;
}