From owner-freebsd-hackers Fri Jun 23 9:29: 3 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from bedrock.hboc.com (hboc.com [139.177.224.128]) by hub.freebsd.org (Postfix) with SMTP id 2598F37C3AA for ; Fri, 23 Jun 2000 09:28:59 -0700 (PDT) (envelope-from Peter.Bohne@hboc.com) Received: from moosehead.hboc.com by bedrock.hboc.com via smtpd (for hub.FreeBSD.ORG [204.216.27.18]) with SMTP; 23 Jun 2000 16:28:59 UT Received: from SMTP (msteal.hboc.com [192.168.0.19]) by mrcheatem.hboc.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2448.0) id KJGF1BPV; Fri, 23 Jun 2000 12:27:46 +0100 Received: from dmz.hboc.com ([139.177.6.114]) by 192.168.0.19 (Norton AntiVirus for Internet Email Gateways 1.0) ; Fri, 23 Jun 2000 16:30:15 0000 (GMT) Received: from atlexc90nthub.hboc.com by dmz.hboc.com via smtpd (for wildgoose.hboc.com [192.168.0.19]) with SMTP; 23 Jun 2000 16:28:57 UT Received: by atlexc90nthub.hboc.com with Internet Mail Service (5.5.2448.0) id ; Fri, 23 Jun 2000 12:28:23 -0400 Message-ID: <35BEC7ED0A15D21199F000805F6F6D6A01CB00E5@bldexc01ntms.clinicom.com> From: "Bohne, Peter" To: "'andrew@ugh.net.au'" Cc: hackers@FreeBSD.ORG Subject: RE: libc_r/_read(), should the errno be reset to 0? Date: Fri, 23 Jun 2000 12:28:34 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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