changeset 24011:005649461c77

In our child DNS lookup processes, don't bother to use select to watch the pipe with our parent. These processes don't do anything else, and they only need to watch one fd, so we can just use a blocking read() call. I don't think this will negatively affect anything, and it seems to fix some kind of funky rare race condition where the libpurple client will block while trying to read() a response from the child. If you think we should continue using select here, or you notice some problems with this, please let me know (and maybe even revert this)
author Mark Doliner <mark@kingant.net>
date Wed, 10 Sep 2008 21:48:33 +0000
parents f085e284f2df
children b703102fa0a5
files libpurple/dnsquery.c
diffstat 1 files changed, 0 insertions(+), 10 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dnsquery.c	Wed Sep 10 21:32:50 2008 +0000
+++ b/libpurple/dnsquery.c	Wed Sep 10 21:48:33 2008 +0000
@@ -209,16 +209,6 @@
 	 * the result back to our parent, when finished.
 	 */
 	while (1) {
-		fd_set fds;
-		struct timeval tv = { .tv_sec = 40 , .tv_usec = 0 };
-		FD_ZERO(&fds);
-		FD_SET(child_in, &fds);
-		rc = select(child_in + 1, &fds, NULL, NULL, &tv);
-		if (!rc) {
-			if (show_debug)
-				printf("dns[%d]: nobody needs me... =(\n", getpid());
-			break;
-		}
 		rc = read(child_in, &dns_params, sizeof(dns_params_t));
 		if (rc < 0) {
 			fprintf(stderr, "dns[%d]: Error: Could not read dns_params: "