Re: pg_check_dir comments and implementation mismatch - Mailing list pgsql-hackers

From Noah Misch
Subject Re: pg_check_dir comments and implementation mismatch
Date
Msg-id 20150220055933.GA66201@tornado.leadboat.com
Whole thread Raw
In response to Re: pg_check_dir comments and implementation mismatch  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: pg_check_dir comments and implementation mismatch  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Mon, Feb 02, 2015 at 03:48:33PM -0500, Robert Haas wrote:
> On Sat, Jan 31, 2015 at 8:28 AM, Marco Nenciarini <marco.nenciarini@2ndquadrant.it> wrote:
> > I've attached a new version of the patch fixing the missing closedir on
> > readdir error.
> 
> If readir() fails and closedir() succeeds, the return will be -1 but
> errno will be 0.

Out of curiosity, have you seen a closedir() implementation behave that way?
It would violate C99 ("The value of errno is zero at program startup, but is
never set to zero by any library function.") and POSIX.



pgsql-hackers by date:

Previous
From: Corey Huinker
Date:
Subject: Re: dblink: add polymorphic functions.
Next
From: Michael Paquier
Date:
Subject: Re: Strange assertion using VACOPT_FREEZE in vacuum.c