From: Timo Sirainen Date: Fri, 17 Sep 2010 16:30:30 +0000 (+0100) Subject: poll: Added a workaround for AIX to get it to notice IO_ERRORs X-Git-Tag: 2.0.3~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cd65920767c81e079994df625ade27531f72f5c2;p=thirdparty%2Fdovecot%2Fcore.git poll: Added a workaround for AIX to get it to notice IO_ERRORs --- 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)