dovecot-1.2: Removed "die after 3 EINTR write() failures to log".
dovecot at dovecot.org
dovecot at dovecot.org
Wed Sep 15 20:43:12 EEST 2010
details: http://hg.dovecot.org/dovecot-1.2/rev/e67b892c9ff3
changeset: 9614:e67b892c9ff3
user: Timo Sirainen <tss at iki.fi>
date: Wed Sep 15 18:42:58 2010 +0100
description:
Removed "die after 3 EINTR write() failures to log".
This can happen with a busy master process that is receiving a lot of
SIGCHLD signals rapidly while trying to log.
diffstat:
src/lib/failures.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diffs (23 lines):
diff -r d2da54c3d829 -r e67b892c9ff3 src/lib/failures.c
--- a/src/lib/failures.c Wed Sep 08 17:43:33 2010 +0100
+++ b/src/lib/failures.c Wed Sep 15 18:42:58 2010 +0100
@@ -81,7 +81,6 @@
struct ioloop *ioloop;
struct io *io;
ssize_t ret;
- unsigned int eintr_count = 0;
while ((ret = write(fd, data, len)) != (ssize_t)len) {
if (ret > 0) {
@@ -95,9 +94,9 @@
errno = ENOSPC;
return -1;
}
- if (errno == EINTR && ++eintr_count < 3) {
+ if (errno == EINTR) {
/* we don't want to die because of this.
- try again a couple of times. */
+ especially SIGCHLD signals can be coming rapidly. */
continue;
}
if (errno != EAGAIN)
More information about the dovecot-cvs
mailing list