From 178a1f187caeef0c0a883c132ab9de5124b6cdc4 Mon Sep 17 00:00:00 2001 From: Takashi Sakamoto Date: Wed, 30 Oct 2019 00:07:59 +0900 Subject: [PATCH] axfer: return the number of file descriptors for I/O events from select(2) waiter A call of select(2) returns error code at failure, the number of file descriptors available I/O at success. Current implementation of waiter abstraction for select(2) returns 0 at success and callers can't get the number. This commit fixes it. Signed-off-by: Takashi Sakamoto Signed-off-by: Jaroslav Kysela --- axfer/waiter-select.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/axfer/waiter-select.c b/axfer/waiter-select.c index a2776e5..9dc549b 100644 --- a/axfer/waiter-select.c +++ b/axfer/waiter-select.c @@ -91,7 +91,7 @@ static int select_wait_event(struct waiter_context *waiter, int timeout_msec) pfd->revents |= POLLHUP; } - return 0; + return err; } static void select_release(struct waiter_context *waiter)