Mercurial > pidgin.yaz
changeset 32405:d3d41ba0c3b8
In our forked DNS resolver processes, don't bail out if we get a retryable
error while reading from our parent socket. I think EAGAIN and EWOULDBLOCK
never happen because this is a non-blocking socket AND because we're using
select (seems like we'd be fine using one or the other, and it's not necessary
to use both?). I believe this is correct behavior and we should be doing
this same thing everywhere we read from sockets. I think we probably don't
check for EINTR in many places where we should.
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Wed, 24 Aug 2011 17:54:39 +0000 |
parents | fbbb9edb1d4c |
children | 16b33ffd75f8 |
files | libpurple/dnsquery.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnsquery.c Wed Aug 24 15:06:36 2011 +0000 +++ b/libpurple/dnsquery.c Wed Aug 24 17:54:39 2011 +0000 @@ -297,6 +297,10 @@ } rc = read(child_in, &dns_params, sizeof(dns_params_t)); if (rc < 0) { + if (errno == EINTR || errno == EAGAIN || errno == EWOULDBLOCK) { + /* Try again */ + continue; + } fprintf(stderr, "dns[%d]: Error: Could not read dns_params: " "%s\n", getpid(), strerror(errno)); break;