From: Ian Jackson Date: Sat, 20 Sep 2014 16:52:14 +0000 (+0100) Subject: poll: Introduce and use BEFOREPOLL_WANT_FDS X-Git-Tag: proposed.polypath.v3~48 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?a=commitdiff_plain;h=596e839b8e4a81e9f892ecf900d7f3d828a7fb7d;hp=596e839b8e4a81e9f892ecf900d7f3d828a7fb7d;p=secnet.git poll: Introduce and use BEFOREPOLL_WANT_FDS This helper macro provides a convenient implementation of the beforepoll_fn interface for *nfds_io. Use it everywhere. This produces one bugfix: log_from_fd_beforepoll would fail to set *nfds_io if it was finished, This also arranges for many beforepoll callbacks to actually fail properly with ERANGE if there is not enough space. Previously they would blithely write the next fd entry or two. In practice the provided fd array never runs out in the current code, so in these cases we are just fixing latent bugs. Signed-off-by: Ian Jackson ---