Patch for multiple keyserver support

Dave Dykstra dwd@bell-labs.com
Mon Apr 30 20:32:01 2001


While looking at that, I suggest you also put in some code to timeout a
connect() sooner than the default.  I just experienced one of the
keyservers being down and it it took 2 minutes to timeout on Solaris (Linux
takes longer last time I checked).  I'd make up a patch except Werner can't
accept code from me yet because my company hasn't signed a GNU release.

Last week I modified a program to do the same thing, and it was easy:  you
just need to do fcntl(fd, F_SETFL, O_NONBLOCK) on the socket before the
connect(), check for EINPROGRESS from the connect(), and then do a select()
for writability on the fd with a timeout of however long you want.  Note
that if the connection is then refused it will come as an error message
from the next read() or write().  Some older systems may not have
O_NONBLOCK or EINPROGRESS defines so I'd #ifdef out the code if they're
missing.

- Dave Dykstra