Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Jun 2000 12:28:34 -0400
From:      "Bohne, Peter" <Peter.Bohne@hboc.com>
To:        "'andrew@ugh.net.au'" <andrew@ugh.net.au>
Cc:        hackers@FreeBSD.ORG
Subject:   RE: libc_r/_read(), should the errno be reset to 0?
Message-ID:  <35BEC7ED0A15D21199F000805F6F6D6A01CB00E5@bldexc01ntms.clinicom.com>

next in thread | raw e-mail | index | archive | help
Right - but unless I'm mis-remembering the original post (which I may well
be), your *second* read() succeeded, but errno was still set to EAGAIN,
which was causing you some sort of headache.  My apologies if I've got my
memory mixed up - happens all the time :-)
pete

> -----Original Message-----
> From: andrew@ugh.net.au [mailto:andrew@ugh.net.au]
> Sent: Friday, June 23, 2000 10:25 AM
> To: Bohne, Peter
> Cc: FengYue; hackers@FreeBSD.ORG
> Subject: RE: libc_r/_read(), should the errno be reset to 0?
> 
> 
> 
> 
> On Fri, 23 Jun 2000, Bohne, Peter wrote:
> 
> > Anytime you make a call that can potentially set errno, and 
> you are planning
> > to *check* errno afterwards, you have to set errno to 0 
> yourself.  Once a
> 
> ...but you would only be checking errno if the call failed 
> and if the call
> failed then it will have set errno.
> 
> Andrew
> 
> 



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?35BEC7ED0A15D21199F000805F6F6D6A01CB00E5>