pgsql: Properly check for readdir/closedir() failures

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Properly check for readdir/closedir() failures
Date: 2014-03-21 17:45:25
Message-ID: E1WR3VV-0005vA-8d@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Properly check for readdir/closedir() failures

Clear errno before calling readdir() and handle old MinGW errno bug
while adding full test coverage for readdir/closedir failures.

Backpatch through 8.4.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/6f03927fce038096f53ca67eeab9adb24938f8a6

Modified Files
--------------
contrib/pg_archivecleanup/pg_archivecleanup.c | 16 ++++++-
contrib/pg_standby/pg_standby.c | 17 +++++++-
src/backend/storage/file/fd.c | 5 +--
src/bin/initdb/initdb.c | 12 +++---
src/bin/pg_basebackup/pg_receivexlog.c | 22 +++++++++-
src/bin/pg_dump/pg_backup_directory.c | 17 +++++++-
src/bin/pg_resetxlog/pg_resetxlog.c | 57 +++++++++++++------------
src/common/pgfnames.c | 19 +++++----
src/port/dirent.c | 8 +++-
src/port/pgcheckdir.c | 14 ++----
10 files changed, 122 insertions(+), 65 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2014-03-21 17:47:43 pgsql: Remove MinGW readdir/errno bug workaround fixed on 2003-10-10
Previous Message Heikki Linnakangas 2014-03-21 14:13:51 pgsql: Replace the XLogInsert slots with regular LWLocks.