yaz_log (LOG_DEBUG, "select start");
r = select (max_fd+1, &input, &output, &except, &tv);
yaz_log (LOG_DEBUG, "select stop, returned r=%d", r);
yaz_log (LOG_DEBUG, "select start");
r = select (max_fd+1, &input, &output, &except, &tv);
yaz_log (LOG_DEBUG, "select stop, returned r=%d", r);