Skip to Content.
Sympa Menu

freetds - Re: [PATCH] goodread() fix *re-submitted*

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Brian Bruns <camber AT ais.org>
  • To: TDS Development Group <freetds AT franklin.metalab.unc.edu>
  • Subject: Re: [PATCH] goodread() fix *re-submitted*
  • Date: Wed, 20 Mar 2002 23:15:57 -0500 (EST)


On Wed, 20 Mar 2002, Steve Willer wrote:

>
> On Wed, 20 Mar 2002, James Cameron wrote:
>
> > Steve Willer wrote:
> > > In this patch, shouldn't the line:
> > > if (thisgot <= 0) break;
> > > actually be:
> > > if (thisgot <= 0) return -1;
> >
> > That's exactly what I asked. ;-)
>
> Ah.
>
> Actually, when I thought about this a little further, I realized that you
> might want to have retries on EINTR error conditions.This would allow you
> to continue processing even if you've received unrelated SIGALRM signals,
> or a SIGHUP in an Apache environment, etc.
>
> if (thisgot == 0) return got;
> if (thisgot < 0) {
> if (errno == EINTR) return 0;
> return -1;
> }
>

Shouldn't this actually loop instead of returning 0? 0 will be taken for
EOF and the socket closed. Not what we want on an EINTR.

Brian





Archive powered by MHonArc 2.6.24.

Top of Page