Mercurial > dovecot > original-hg > dovecot-1.2
changeset 9614:e67b892c9ff3 HEAD
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.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Wed, 15 Sep 2010 18:42:58 +0100 |
parents | d2da54c3d829 |
children | b7bca02d9ccd |
files | src/lib/failures.c |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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)