dovecot-2.0: poll: Added a workaround for AIX to get it to notic...

dovecot at dovecot.org dovecot at dovecot.org
Fri Sep 17 19:30:37 EEST 2010


details:   http://hg.dovecot.org/dovecot-2.0/rev/4a5e2be6e112
changeset: 12129:4a5e2be6e112
user:      Timo Sirainen <tss at iki.fi>
date:      Fri Sep 17 17:30:30 2010 +0100
description:
poll: Added a workaround for AIX to get it to notice IO_ERRORs

diffstat:

 src/lib/ioloop-poll.c |  8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diffs (18 lines):

diff -r b93405cdd4e9 -r 4a5e2be6e112 src/lib/ioloop-poll.c
--- a/src/lib/ioloop-poll.c	Thu Sep 16 16:28:58 2010 +0100
+++ b/src/lib/ioloop-poll.c	Fri Sep 17 17:30:30 2010 +0100
@@ -155,6 +155,14 @@
 
         /* 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)


More information about the dovecot-cvs mailing list