From cd65920767c81e079994df625ade27531f72f5c2 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 17 Sep 2010 17:30:30 +0100 Subject: [PATCH] poll: Added a workaround for AIX to get it to notice IO_ERRORs --- src/lib/ioloop-poll.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lib/ioloop-poll.c b/src/lib/ioloop-poll.c index 024078ba27..c856eca27e 100644 --- a/src/lib/ioloop-poll.c +++ b/src/lib/ioloop-poll.c @@ -155,6 +155,14 @@ void io_loop_handler_run(struct ioloop *ioloop) /* get the time left for next timeout task */ msecs = io_loop_get_wait_time(ioloop, &tv); +#ifdef _AIX + if (msecs > 1000) { + /* AIX seems to check IO_POLL_ERRORs only at the beginning of + the poll() call, not during it. keep timeouts short enough + so that we'll notice them pretty quickly. */ + msecs = 1000; + } +#endif ret = poll(ctx->fds, ctx->fds_pos, msecs); if (ret < 0 && errno != EINTR) -- 2.47.3