diff -ur jwhois-4.0.old/src/whois.c jwhois-4.0/src/whois.c --- jwhois-4.0.old/src/whois.c 2007-06-26 03:00:29.000000000 -0400 +++ jwhois-4.0/src/whois.c 2009-04-29 11:42:56.000000000 -0400 @@ -115,6 +115,7 @@ unsigned int count, start_count; int ret; char data[MAXBUFSIZE]; + fd_set rfds; count = 0; @@ -124,7 +125,15 @@ do { + FD_ZERO(&rfds); + FD_SET(fd, &rfds); + ret = select(fd + 1, &rfds, NULL, NULL, NULL); + + if (ret <= 0) + return -1; + ret = read(fd, data, MAXBUFSIZE-1); + if (ret >= 0) { count += ret;