On Thu, Apr 12, 2012 at 05:31:27PM +0200, Nikola Pajkovsky wrote:
Vitezslav Samel <vitezslav(a)samel.cz> writes:
> According to select(2) man-page we must not rely on contents
> of fdsets and timeout after an error. Initialize fdsets and timeout
> properly before each invocation of select().
>
> Signed-off-by: Vitezslav Samel <vitezslav(a)samel.cz>
> ---
> src/packet.c | 27 +++++++++++----------------
> 1 files changed, 11 insertions(+), 16 deletions(-)
I'm voting for epoll in future. it's faster.
But also nonportable (at least to *BSD). In contrast
poll(2) might be OK.
Vita