tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [PATCH 1/6] fix ambiguous errno treating after mktime()



In article <20080830064247.GB18403%netbsd.org@localhost>,
David Holland  <dholland-tech%netbsd.org@localhost> wrote:
>On Fri, Aug 29, 2008 at 06:26:38PM -0400, Roland Dowdeswell wrote:
> >> code like
> >> 
> >>    if (read(fd, buf, len < 0)) {
> >>       close(fd);
> >>       perror("read");
> >>       exit(1);
> >>    }
> >> 
> >> would behave as intended in the common case.
> >
> > That said, close(2) can in fact return an error and set errno if
> > you are using AFS and so the code example that you gave is incorrect.
>
>Yes, that's why I said "the common case" :-)

FYI, I fixed the original issue a few days ago.

christos



Home | Main Index | Thread Index | Old Index