Re: pg_check_dir comments and implementation mismatch

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Marco Nenciarini <marco(dot)nenciarini(at)2ndquadrant(dot)it>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_check_dir comments and implementation mismatch
Date: 2015-02-20 05:59:33
Message-ID: 20150220055933.GA66201@tornado.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(dot)nenciarini(at)2ndquadrant(dot)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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2015-02-20 06:00:12 Re: Strange assertion using VACOPT_FREEZE in vacuum.c
Previous Message Corey Huinker 2015-02-20 05:50:25 Re: dblink: add polymorphic functions.