Re: [COMMITTERS] pgsql: Add comments about why errno is set - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [COMMITTERS] pgsql: Add comments about why errno is set
Date
Msg-id 200512012138.jB1Lcu400933@candle.pha.pa.us
Whole thread Raw
In response to Re: [COMMITTERS] pgsql: Add comments about why errno is set to zero.  (Martijn van Oosterhout <kleptog@svana.org>)
Responses Re: [COMMITTERS] pgsql: Add comments about why errno is
List pgsql-hackers
Martijn van Oosterhout wrote:
-- Start of PGP signed section.
> On Thu, Dec 01, 2005 at 04:12:30PM -0500, Bruce Momjian wrote:
> > Well, there seems to be enough confusion, even in this email list, that
> > identifying _why_ errno is being cleared is a good idea.
> > 
> > I modified it to:
> > 
> >         errno = 0;  /* avoid having to check the result for failure */
> 
> I don't know about others but I find that wording ambiguous. Like it's
> saying that once you've done that it can't fail. I think I'd prefer
> something like:
> 
> errno = 0;   /* Make error condition detectable */
> 
> or even
> 
> errno = 0;   /* clear pending errors */
> 
> or
> 
> errno = 0;   /* clear prior detected errors */

Maybe it should be:
errno = 0;    /* Allow unconditional errno check */

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
359-1001+  If your life is a hard drive,     |  13 Roberts Road +  Christ can be your backup.        |  Newtown Square,
Pennsylvania19073
 


pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: SHOW ALL output too wide
Next
From: Neil Conway
Date:
Subject: Re: [COMMITTERS] pgsql: Add comments about why errno is