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()



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" :-)

-- 
David A. Holland
dholland%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index