According to Geoff Hutchison:
> So here's my suggestion for adapting the patch to the current
> code. #ifndef EAGAIN will run the current code exactly. Otherwise, add a
> check for EAGAIN to decide if we break and fail. It seems like the
> smallest amount of change to the current 3.1.6 code.
>
> status = ::connect(sock, (struct sockaddr *)&server, sizeof(server));
> //
> // Disable alarm and restore previous policy if any
> //
> alarm(0);
> sigaction(SIGALRM, &old_action, 0);
>
> if (status == 0 || errno == EALREADY || errno == EISCONN)
> {
> connected = 1;
> return OK;
> }
>
> //
> // Only loop if timed out. Other errors are fatal.
> //
> #ifndef EAGAIN
> if (status < 0 && errno != EINTR)
To re-enable allow_EINTR handling, I'd say that should be...
if (status < 0 && (errno != EINTR || !allow_EINTR))
> break;
> #else
> if (status < 0 && errno != EINTR && errno != EAGAIN)
... and ...
if (status < 0 && (errno != EINTR || !allow_EINTR) && errno != EAGAIN)
> break;
> #endif
>
> ::close(sock);
> open();
> sleep(wait_time);
> }
The 3.1.5 code seemed to have the test for allow_EINTR backwards, so
that the code ended up not allowing EINTR. The Connection::connect()
method was always called with an argument of 1, so !allow_EINTR was
always false, so the code never retried after an EINTR. It's been a
bug since the 3.0.8b2 days.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html