Re: pg_check_dir comments and implementation mismatch

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: pg_check_dir comments and implementation mismatch
Дата
Msg-id CA+TgmoYnZUeHenALQZ+iJMcVvsS_A0VpzkGz3hOL=ZMX1FkykQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_check_dir comments and implementation mismatch  (Noah Misch <noah@leadboat.com>)
Ответы Re: pg_check_dir comments and implementation mismatch  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Fri, Feb 20, 2015 at 12:59 AM, Noah Misch <noah@leadboat.com> wrote:
> 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.

No.  Good point, I didn't think about that.  I think this way is safer, though.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: Allow "snapshot too old" error, to prevent bloat
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Precedence of standard comparison operators