gstatic: don't abort just because one host has a connect() failure.

If IPv4 or IPv6 was down, we might abort early and return neither result,
which was wrong.

While we're here, fix up various other error handling mistakes.  In
particular, don't perror() when errno==0, or you might get the dreaded
"Error: success" message.  Add an overall alarm() to handle any blocking
syscalls that never return.  Don't use exceptfd in select(), since readfd
covers all the interesting types of exceptions, and removing it removes the
need to check readfd, which we hadn't been doing.

Change-Id: I75e839b0608d51bfee5e2a31c9a1ce2e4ece1e23
1 file changed